Hi Team,
We are using RadNavigation view for our menu control. We are using it in submenu configuration way. We are able to create and navigate to different views. We are using .Net Core with No Xaml configuration. We wanted to have theme option for our entire application. For this we have referred and followed CRM application and created the Theme part same as CRM application. We are able to apply theme and change theme as per choice of user for entire application but we are facing some issues with RadNavigationView control. Below are the challenges that we are facing and something that we want to achieve in our application.
1. We are able to apply the theme but on submenus theme does not get applied also it does not get applied for hover and selected state of the menu. We have tried few approaches and still no success?
2. We want user to select theme once and once they have selected the theme we will save their choice and will open the app in the previously saved theme. We are not able to implement it currently.
We are using NoXAML approach hence we have added necessary files .XAML file in the resource dictionary in App.XAML.
Kindly help us design our application with above 2 points as we are struck in this from few days.
Things we have tried to apply theme colors on hover, for selected menu and for dropdown icon in case of submenu.
<Style x:Key="ItemPreviewStyle" TargetType="telerik:RadNavigationViewItem" BasedOn="{StaticResource RadNavigationViewItemStyle }">
<Setter Property="IconTemplate">
<Setter.Value>
<DataTemplate>
<telerik:RadGlyph Glyph="{Binding Converter={StaticResource StringToGlyphConverter}}"
Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=telerik:RadNavigationViewItem}}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ItemBaseStyle" TargetType="telerik:RadNavigationViewItem" BasedOn="{StaticResource ItemPreviewStyle}">
<Setter Property="Content" Value="{Binding Title}"/>
<Setter Property="ItemsSource" Value="{Binding SubItems}"/>
<Setter Property="Foreground" Value="{theme:VoyagerThemeResource Resource=Foreground}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="FocusVisualStyle" Value="{theme:VoyagerThemeResource Resource=AccentBrush}" />
<Setter Property="Icon" Value="{Binding Icon}" />
<Setter Property="IconVisibility" Value="{Binding Icon, Converter={StaticResource NullToVisibilityConverter}}"/>
</Style>
Because of this changes submenus text get the background color but still no affect on hover, selected state and proper theme color of menu. let us know if we are doing anything wrong. Also help us achieving the second case.
I have added Radial menu as RadialContextMenu in RadGridView.
I want to get the selectedRow DataContext on item click.
I tried to set RadRadialMenu.DataContext as Gridview Selected Item, but as ItemClick datacontext is null. Default datacontext of Radial menu is UserControl's DataContext. which need to be replaced with GridView Selected Row.
I have one option to Bind DataContex of individual RadRadialMenuItem with GridView selectedItem, but It seems not proper way.
I have a GridView with ChildTableDefinitions which adds a column with pluses to expand and see child gridviews. How do I put a header title on that column?
Hi All,
I Used telerik:ListBox Control which has selection changed Event and for this event I was writing Unit Test code(X-Unit).
VM Code:
var selectionChangedEventArg = parameter as System.Windows.Controls.SelectionChangedEventArgs;
if (selectionChangedEventArg != null && selectionChangedEventArg.OriginalSource != null)
{}
TEST CODE:
////Arrange
System.Windows.Controls.SelectionChangedEventArgs obj =
new System.Windows.Controls.SelectionChangedEventArgs(routedEvent, removedItems, addedItems);
////Act
detailViewModel.SelectionChangedCommand.Execute(obj);
selectionChangedEventArg.OriginalSource was null when the method is called from Test method. Any idea to make the original Source has value.
Hello.
I want to load a desktop files in grid view using MVVM. Is there a way? (I'm not use MVVM Light kit.)
It is easy to add and remove files by using buttons, but Drag and Drop is difficult to implement because there are not many examples.
I want to add it using the file model using drag and drop and add it to the column by customizing it.
See the image for details.
<This is a simple .xaml>
<
telerik:RadGridView
ItemsSource
=
"{Binding MultiFiles}"
rad:GridViewSelectionUtilities.SelectedItems
=
"{Binding MultiFileItems}"
GroupRenderMode
=
"Flat"
HorizontalAlignment
=
"Stretch"
AutoGenerateColumns
=
"False"
ShowColumnHeaders
=
"True"
ShowGroupFooters
=
"False"
ShowGroupPanel
=
"False"
RowIndicatorVisibility
=
"Collapsed"
EnableColumnVirtualization
=
"True"
EnableRowVirtualization
=
"True"
VirtualizingPanel.IsVirtualizing
=
"True"
ScrollViewer.HorizontalScrollBarVisibility
=
"Auto"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
FrozenColumnsSplitterVisibility
=
"Collapsed"
IsFilteringAllowed
=
"False"
AutoExpandGroups
=
"False"
ShowSearchPanel
=
"False"
SearchPanelCloseButtonVisibility
=
"Collapsed"
SelectionMode
=
"Extended"
SelectionUnit
=
"FullRow"
>
<
telerik:RadGridView.Resources
>
<
Style
x:Key
=
"CheckboxCellStyle"
TargetType
=
"telerik:GridViewCell"
BasedOn
=
"{StaticResource GridViewCellStyle}"
>
<
Setter
Property
=
"HorizontalContentAlignment"
Value
=
"Center"
/>
</
Style
>
</
telerik:RadGridView.Resources
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewSelectColumn
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
ToolTip
=
"{Binding Name}"
IsReadOnly
=
"True"
Width
=
"300"
Header
=
"File Name"
/>
<
telerik:GridViewComboBoxColumn
ItemsSourceBinding
=
"{Binding WorkTypes}"
DataMemberBinding
=
"{Binding WorkType}"
DisplayMemberPath
=
"Name"
SelectedValueMemberPath
=
"Name"
IsReadOnly
=
"False"
Width
=
"80"
Header
=
"WorkType"
>
</
telerik:GridViewComboBoxColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Status}"
ToolTip
=
"{Binding Status}"
IsReadOnly
=
"True"
Width
=
"60"
Header
=
"Status"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding EtcText}"
ToolTip
=
"{Binding EtcText}"
IsReadOnly
=
"True"
Width
=
"auto"
Header
=
"ETC"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
<Model>
public class MultiFileModel
{
public string Name { get; set; } = string.Empty;
public string WorkTypes { get; set; } = string.Empty;
public string Status { get; set; } = $"X";
public string EtcText { get; set; } = string.Empty;
}
<ViewModel>
?
Thanks.
Is there a way to completely hide the Navigation area on a RadMap? I can hide the navigation buttons themselves but the background circle remains. I am using the fluent theme.
I have attached two images to help you see what I am describing. The first picture shows the window with the navigation visible. In the second image I have set NavigationVisibility to collapsed. This removed the arrow buttons but left the background circle. Is there a way to remove that background circle along with the navigation buttons?
Hello Telerik,
I am having a situation when using expandable rows.
When they have no children, the Expand Button keeps displaying.
Since it will come up empty, there is no reason for it to be there
so what I want is to hide it in case the row has no children.
I another ticket, I was guided to see this link
http://www.telerik.com/forums/show-and-hide-expand-button-dynamically
But in my case I will have no such "clean" button. I simply want to hide the expand buttons during the grid load time without losing performance (I have 1 mil rows and 4 mil children spread among them)
Please show me the best way to achieve this.
it has to do with
row.IsExpandable = false;
at some point, right? What's is it?
Thank you.
<
Color
x:Key
=
"GsBackgroundDarkColor"
>#002B35</
Color
>
<
Color
x:Key
=
"GsForegroundLightColor"
>#FFFFFFFF</
Color
>
<
Color
x:Key
=
"GsMediumColor"
>#FFC0C0C0</
Color
>
<
Color
x:Key
=
"GsLowColor"
>#758595</
Color
>
<
Color
x:Key
=
"GsHighColor"
>#FFBDBDC2</
Color
>
<
Color
x:Key
=
"GsAccentColor"
>#FF26A0DA</
Color
>
<!-- This is the standard Windows8Touch accent color-->
<
Color
x:Key
=
"GsEffectHighColor"
>#92376472</
Color
>
<
Color
x:Key
=
"GsEffectLowColor"
>#FF1E2D3A</
Color
>
var palette = Windows8TouchPalette.Palette;
palette.FontSizeXXL = UserSettings.FontSizeTitle;
palette.FontSizeXL = UserSettings.FontSizeHeader;
palette.FontSizeL = UserSettings.FontSize;
palette.FontSize = UserSettings.FontSizeMedium;
palette.FontSizeS = UserSettings.FontSizeSmall;
palette.FontFamily =
new
FontFamily(
"Segoe UI"
);
if
(Application.Current.TryFindResource(
"GsBackgroundDarkColor"
)
is
not Color backColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find background color"
);
}
else
{
palette.MainColor = backColor;
palette.InvertedForegroundColor = backColor;
}
if
(Application.Current.TryFindResource(
"GsForegroundLightColor"
)
is
not Color foreColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find foreground light color"
);
}
else
{
palette.MainForegroundColor = foreColor;
palette.InvertedColor = foreColor;
}
if
(Application.Current.TryFindResource(
"GsLowColor"
)
is
not Color lowColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find GsLowColor"
);
}
else
{
palette.LowColor = lowColor;
}
if
(Application.Current.TryFindResource(
"GsMediumColor"
)
is
not Color medColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find GsMediumColor"
);
}
else
{
palette.MediumColor = medColor;
}
if
(Application.Current.TryFindResource(
"GsHighColor"
)
is
not Color highColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find GsHighColor"
);
}
else
{
palette.HighColor = highColor;
}
if
(Application.Current.TryFindResource(
"GsAccentColor"
)
is
not Color accentColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find GsAccentColor"
);
}
else
{
palette.AccentColor = accentColor;
}
if
(Application.Current.TryFindResource(
"GsEffectLowColor"
)
is
not Color effectLowColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find GsEffectLowColor"
);
}
else
{
palette.EffectLowColor = effectLowColor;
}
if
(Application.Current.TryFindResource(
"GsEffectHighColor"
)
is
not Color effectHighColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find effectHighColor"
);
}
else
{
palette.EffectLowColor = effectHighColor;
}
var theme =
new
Windows8TouchTheme();
StyleManager.ApplicationTheme = theme;