Hello ,
I have Xamdatagrid and there is a context Menu which i have to display when any Header is right click , My context Menu item is not showing the text of menu items when the menu display on the mouse right click in the Header.Below is the code which im using .Pls correct my code if there is any error.
<ContextMenu x:Key="PagingMnu" Background="AliceBlue" AllowDrop="True" Cursor="Hand" IsEnabled="True"> <ContextMenu.Items> <MenuItem Header="Ten 10" Name="a10" /> <MenuItem Header="Twenty 20" Name="b20" /> <MenuItem Header="Thirty 30" Name="c30"/> </ContextMenu.Items></ContextMenu>
<Style TargetType="igDP:HeaderLabelArea">
<Setter Property="ContextMenu" Value="{StaticResource PagingMnu}"/>
</Style>
I added xmlns:igThemes="http://infragistics.com/Themes"
and
<UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <igThemes:PrimitivesLunaNormal/> <igThemes:DataPresenterLunaNormal/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </UserControl.Resources>
and Theme="LucidDream" to the igDP:XamDataGrid control tag
but adding these had no effect on grid appearance. Where is the theme "LucidDream" declared? The post for "Setting Themes" did not include a the need to set a theme specifically on the XamDataGrid control. See http://help.infragistics.com/Help/NetAdvantage/WPF/2009.1/CLR3.X/html/WPF_Using_Themes.html
If it matters, I've been working with the following in the App.xaml file:
<Application.Resources> <ResourceDictionary Source="Resources/BureauBlue.xaml"/> </Application.Resources>
HELP!
::Sigh:. I think I figured it out. Getting rid of the Template="LunaNormal" fxied it. Thanks
Hi Joe,
I've tried a dozen times to override properties on a specific theme without success. I'm really not sure what I'm doing wrong. Any help on this would be appreciated
<Window.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <igThemes:DataPresenterLunaNormal /> </ResourceDictionary.MergedDictionaries> <LinearGradientBrush x:Key="CellAreaBackgroundHover" StartPoint="0,0" EndPoint="0,1"> <GradientStop Offset="0" Color="Crimson"/> <GradientStop Offset="1" Color="BlanchedAlmond"/> </LinearGradientBrush> <SolidColorBrush x:Key="CellAreaBackgroundHoverBorder" Color="DeepPink" /> <Style TargetType="igDP:DataRecordCellArea" BasedOn="{x:Static igThemes:DataPresenterLunaNormal.DataRecordCellArea}"> <Setter Property="BackgroundHover" Value="{StaticResource CellAreaBackgroundHover}" /> <Setter Property="BorderHoverBrush" Value="{StaticResource CellAreaBackgroundHoverBorder}" /> </Style> </ResourceDictionary> </Window.Resources>
...
<igDP:XamDataGrid x:Uid="igDP:XamDataGrid_1" Grid.Row="1" Theme="LunaNormal" x:Name="XamDataGrid1" />
All I see is the default colors of the them
Yes there is. We expose static properties for each theme's styling points so you can create 'BasedOn' styles. Here is some sample xaml:
xmlns:igThemes="http://infragistics.com/Themes"
>
<ResourceDictionary>
<igThemes:DataPresenterRoyaleStrong/>
<ContextMenu x:Key="PagingMnu" Background="AliceBlue" AllowDrop="True" Cursor="Hand" IsEnabled="True">
<MenuItem Header="Ten 10" />
<MenuItem Header="Thirty 30" />
</ContextMenu>
<Style TargetType="igDP:HeaderLabelArea"
</ResourceDictionary>
</Window.Resources>
Hello Joe,
Thanks for your reply , Its my fault,Actually when i am using built in Themes of XamDataGrid like RoyaleStrong then the style which i had define in the form is not working like the style of TargetType="igDP:HeaderLabelArea".
Is there any way to use the built in Themes and override some styles of it in the form ?
Thanks in advance.
Rehman Mansoor