How use Style in PageFunction?
This construction is not work:
<PageFunction.Resources>
<Style ... />
</PageFunction.Resources>
Related
For a WPF project with Dev Express, is there a way i can define a series in the .xaml.cs file and reference this in the xaml file instead of manually writing the points as shown -
<Window x:Class="Bubble2DChart.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts" Title="Window1" Height="350" Width="620">
<Grid>
<dxc:ChartControl>
<dxc:ChartControl.CrosshairOptions>
<dxc:CrosshairOptions ShowValueLine="True" ShowValueLabels="True"/>
</dxc:ChartControl.CrosshairOptions>
<dxc:ChartControl.Diagram>
<dxc:XYDiagram2D>
<dxc:XYDiagram2D.Series>
<dxc:BubbleSeries2D Transparency="0.2" AutoSize="False" MinSize="1" MaxSize="3" ColorEach="True"
CrosshairLabelPattern="Argument: {A}; Value: {V}; Weight: {W}">
<dxc:BubbleSeries2D.Points>
<dxc:SeriesPoint Argument="A" Value="100" dxc:BubbleSeries2D.Weight="0.9" />
<dxc:SeriesPoint Argument="B" Value="60" dxc:BubbleSeries2D.Weight="0.8" />
<dxc:SeriesPoint Argument="C" Value="30" dxc:BubbleSeries2D.Weight="0.5" />
<dxc:SeriesPoint Argument="D" Value="43" dxc:BubbleSeries2D.Weight="0.4" />
<dxc:SeriesPoint Argument="E" Value="11" dxc:BubbleSeries2D.Weight="0.4"/>
<dxc:SeriesPoint Argument="F" Value="29" dxc:BubbleSeries2D.Weight="0.2"/>
<dxc:SeriesPoint Argument="G" Value="12" dxc:BubbleSeries2D.Weight="0.2"/>
<dxc:SeriesPoint Argument="H" Value="21" dxc:BubbleSeries2D.Weight="0.2"/>
<dxc:SeriesPoint Argument="I" Value="28" dxc:BubbleSeries2D.Weight="0.2"/>
</dxc:BubbleSeries2D.Points>
</dxc:BubbleSeries2D>
</dxc:XYDiagram2D.Series>
<dxc:XYDiagram2D.AxisY>
<dxc:AxisY2D GridLinesMinorVisible="True" >
<dxc:AxisY2D.WholeRange>
<dxc:Range MinValue="0" MaxValue="130"
SideMarginsValue="0" />
</dxc:AxisY2D.WholeRange>
</dxc:AxisY2D>
</dxc:XYDiagram2D.AxisY>
</dxc:XYDiagram2D>
</dxc:ChartControl.Diagram>
</dxc:ChartControl>
</Grid>
I suggest you to go through documentation: Bind a Series to a Data Source
To do this, assign your data source to the Series.DataSource property, and define the Series.ArgumentDataMember and Series.ValueDataMember properties.
You can bind a Chart to an Observable Collection, Data from an MDB File, Static Resource etc. You can follow the example to implement your functionality.
can we change the background color of NativeModules.UIManager.showPopupMenu menu ? It shows white background by default. I'm creating an app which has darker theme so need to chnage the background color.
Yes, you can do this with some simple changes.
Your React theme should have these 2 properties :
<style name="ReactAppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- if using android.widget.PopupMenu -->
<item name="android:popupMenuStyle">#style/PopupMenu</item>
<!-- if using android.support.v7.widget.PopupMenu -->
<item name="popupMenuStyle">#style/PopupMenu</item>
</style>
and then define your PopupMenu theme like this :
<style name="PopupMenu" parent="Theme.AppCompat.DayNight">
<item name="android:textColor">some color</item>
<item name="android:colorBackground">some color</item>
<item name="android:popupBackground">some color</item>
</style>
I am using material UI's Grid component and making use of the auto property for the first column
so I have
<Grid container className={classes.borderclass}>
<Grid item xs={"auto"}>
<Items />
</Grid>
<Grid item xs={10}>
<Content />
</Grid>
</Grid>
However this will not fill the entire container but I do not seem to see an option for remainder in the sizes.
I have looked into css calc option however I do not see a way to get the size of the auto column in react to compare against the div
any suggestions even if it is not material ui will be appreciated.
If you check the Material-UI demo, they have a working example that shows the auto property in action. So, as the example depicted here, you don't need to specify the auto keyword. Do just this:
<Grid container className={classes.borderclass}>
<Grid item xs>
<Items />
</Grid>
<Grid item xs={10}>
<Content />
</Grid>
</Grid>
I have a XAML resource dictionary in project A. How can I merge it into a resource dictionary in project B?
Where Granite.Xaml is the library and ConvertersList.xaml has been marked as a resource.
<ResourceDictionary Source="/Granite.Xaml;component/ConvertersList.xaml" />
Here is the contents of the resource dictionary. Note that I had to include the assembly name in the namespace declaration even though the converters are in the same project as the dictionary. If you fail to do this you will get a runtime exception.
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Granite.Xaml.Converters;assembly=Granite.Xaml"
>
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
<converters:DebugBreakConverter x:Key="DebugBreakConverter" />
<converters:DebugTraceConverter x:Key="DebugTraceConverter" />
<converters:DictionaryConverter x:Key="DictionaryConverter" />
<converters:MaxLengthToBoolTrueConverter x:Key="MaxLengthToBoolTrueConverter" />
<converters:MinLengthToBoolTrueConverter x:Key="MinLengthToBoolTrueConverter" />
<converters:NotBoolToVisibilityConverter x:Key="NotBoolToVisibilityConverter" />
<converters:NotConverter x:Key="NotConverter" />
<converters:NotNullToBooleanConverter x:Key="NotNullToBooleanConverter" />
<converters:NotNullToVisibilityConverter x:Key="NotNullToVisibilityConverter" />
<converters:NotZeroToBooleanConverter x:Key="NotZeroToBooleanConverter" />
<converters:NotZeroToVisibilityConverter x:Key="NotZeroToVisibilityConverter" />
<converters:NullToBooleanConverter x:Key="NullToBooleanConverter" />
<converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
<converters:StringToBooleanConverter x:Key="StringToBooleanConverter" />
<converters:StringToLowerConverter x:Key="StringToLowerConverter" />
<converters:StringToUpperConverter x:Key="StringToUpperConverter" />
<converters:ZeroToBooleanConverter x:Key="ZeroToBooleanConverter" />
<converters:ZeroToVisibilityConverter x:Key="ZeroToVisibilityConverter" />
</ResourceDictionary>
This works for me:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Namespace.From.Your.Dll;component/Style.xaml"/>
</ResourceDictionary.MergedDictionaries>
Why is the Canvas covering the other Children of the Dock Panel?
I'm setting up a menu bar at the top of the client area and a status bar at the bottom of the client area of the window as per standard convention in xaml as follows:
<Window x:Class="RichCoreW.ScenEditWnd"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="ScenEditWnd" Height="490" Width="776" HorizontalAlignment="Right">
<DockPanel Name="mapDockP">
<Menu IsMainMenu="True" DockPanel.Dock="Top">
<MenuItem Header="File">
<MenuItem Header="Save" Name="menuISave" Click="menuISave_Click"/>
<MenuItem Header="Make Playable" Click="MakePlayable" />
</MenuItem>
<MenuItem Command="ApplicationCommands.Help" />
</Menu>
<StackPanel DockPanel.Dock="Bottom" Name="stackPanel1" Orientation="Horizontal" background="Yellow">
<Label Content="Playable:" Name="label1" />
<Label Name="labPlayable" />
</StackPanel>
</DockPanel>
</Window>
Then I add a an instance of the MapCanvEdit Class which inherits from Canvas in C# code as follows. As its the last child to be added to the Dockpanel it should take the remaining space in the Dockpanel. But it covers the menu and status bars as well covering the whole of the client area. To be precise it is the children of the Canvas that cover over the other two Stack Panels. Where the Canvas(MapCanvEdit) is empty you can see the Menu and Status bars:
public partial class ScenEditWnd : Window
{
ScenC scenC;
MapCanvEdit mapCanvE;
public ScenEditWnd(ScenC scenCI)
{
InitializeComponent();
scenC = scenCI;
mapCanvE = new MapCanvEdit(scenC);
mapDockP.Children.Add(mapCanvE);
MouseWheel += mapCanvE.Zoom;
mapCanvE.SizeChanged += delegate { mapCanvE.DrawHexs(); };
ContentRendered += delegate { mapCanvE.DrawHexs(); };
labPlayable.Content = scenC.playable.ToString();
}
}
I've left out the other methods for simplicity. Any help appreciated!
It's just the way Canvas works. It can place its children outside its own area. If you want it to restrict children to bounds set ClipToBounds="True" (see ClipToBounds on MSDN) or use another panel.