Telerik Forums
UI for WPF Forum
17 answers
1.1K+ views

    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.

Ilya
Top achievements
Rank 1
 answered on 14 Jan 2021
3 answers
163 views
I am using the Windows8Touch theme with custom colors I generated via the Theme color generator application It works well.  Except for one thing.  In the File Open dialog, no matter what I do, I cannot get one of the text labels -- just the one -- to honor any of the colors I set. 

It is the label at the bottom of the dialog that says "File Name" (at least when English is the language).  It is next to an edit box that shows the file name.  No matter what I do, that little label always shows up as black.   I have attached an image showing what I mean.  The label that I cannot color is circled in red in the image

So I have two questions:

1. Is there some Palette color I can set in the Windows8Touch theme that will make this little label get colored correctly -- without forcing me to write a style or control template?
2. If not, and I am forced to restyle the control myself, then in what part of of what control template or style do I change something?   (Note that I have tried already - copying the DialogWindowTemplate et al and setting both Foreground and TextElement.Foreground in a few places but I cannot figure out where it would go)

If it matters, here are the custom colors I am using:

<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>


And here is my initialization code where I set up the Windows8TouchPaele


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;






Vladimir Stoyanov
Telerik team
 answered on 14 Jan 2021
4 answers
179 views

I have added NoXaml assemblies in WPF .NET 5 application. I had added all necessary xaml theme files for Windows 8, Green, Fluent and Office 2019 theme.

 

I noticed that RadRichTextBox dialogs are not working on Office 2019 theme, Other themes are working fine. I verified all themes are importing same xaml file. 

Also I did not added custom styles to Radrichtextbox. 

 

for reference following are xaml files i added.

<ResourceDictionary.MergedDictionaries>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/System.Windows.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.Chart.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.Data.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.GridView.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.RibbonView.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Cloud.Controls.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.DataVisualization.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.RichTextBox.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.ImageEditor.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.Docking.xaml"/>              
               <ResourceDictionary Source="/Telerik.Windows.Controls;component/Themes/FontResources.xaml"/>            
           </ResourceDictionary.MergedDictionaries>

 

 

Kamran
Top achievements
Rank 3
Iron
Iron
Veteran
 answered on 14 Jan 2021
2 answers
191 views

     Hi,

I've added a DataPager to a DataGrid, and now the DataGrid.IsSynchronizedWithCurrentItem property is not working.  How can I resolve this?  Below is my code...

<DockPanel LastChildFill="True">
    <telerik:RadDataPager x:Name="radDataPager"
    DockPanel.Dock="Bottom"
                          Source="{Binding GridData}"
                          PageSize="100"
                          DisplayMode="All"
                          AutoEllipsisMode="After"
                          NumericButtonCount="5"/>
    <telerik:RadGridView x:Name="radGridView"
                         Margin="0"
                         Width="{Binding ElementName=GridViewGrid, Path=ActualWidth}"
                         EnableColumnVirtualization="True"
                         EnableRowVirtualization="True"
                         AlternateRowBackground="AliceBlue"
                         ItemsSource="{Binding PagedSource, ElementName=radDataPager}"
                         SelectionUnit="FullRow"
                         RowIndicatorVisibility="Collapsed"
                         GridLinesVisibility="None"
                         ScrollMode="Deferred"
                         FilteringMode="Popup"
                         CanUserFreezeColumns="False"
                         AutoGenerateColumns="True"
                         ColumnWidth="Auto"
                         IsSynchronizedWithCurrentItem="True"
                         IsReadOnly="True"
                         IsTabStop="False"
                         ValidatesOnDataErrors="InEditMode"
                         amUI:GridViewEventManager.IsEnabled="True"
                         amUI:LookupTextBoxFilterBehavior.LookupTextBox="{Binding ElementName=LookupTextBox}">
    </telerik:RadGridView>
</DockPanel>

 

Vladimir Stoyanov
Telerik team
 answered on 14 Jan 2021
1 answer
154 views

Hello,

We are currently looking for a way to extend the RadGridView with the ability to search using boolean and comparison operators. Our gridview is bound to a list that is filled with data from our database according to the search text (e.g. for a number field "<100 & >50"). In principle, this works without any problems.

However, the GridView then performs another search in the code, corresponding to a column for the same search text. This logically leads to an empty list, as the search text does not apply to a number field, but we have not yet found a way to bypass the code-based search without also deactivating the search headers etc.

Our question is accordingly at this point:
Is there a way to deactivate the search in the code?
If not, is it possible to bypass it in another way - for example by removing the binding of the search text box and manually searching through a "KeyDown Event"?

Many thanks in advance!

Dilyan Traykov
Telerik team
 answered on 14 Jan 2021
2 answers
181 views
Hello there !
Happy new year all !

I'm trying to do a little change on the standard ScrollBars linked to a RadDiagram.
What I'd like to accomplish is to reduce the move made on the diagram when we click on the two RepeatButton of the ScrollBar.

To manage this modification on the ScrollBar, we usually modify the property SmallChange to adapt to the behaviour we want.

So I tried to add the property in the ScrollBar style used in our telerik:RadDiagram:Resources, but it doesn't change anything apparently.
Then I read that this property is bypassed by the framework when the ScrollBars are in a ScrollViewer (https://referencesource.microsoft.com/#PresentationFramework/src/Framework/System/Windows/Controls/ScrollViewer.cs,b3cec2f89df004cd).

My second try was to add a new ControlTemplate for the ScrollViewer of the RadDiagram, and link it to my ScrollBar Style with the property updated.

However I just read on a topic here that it's not really a ScrollViewer that is added when we set the ScrollViewer.HorizontalScrollBarVisibility/ScrollViewer.VerticalScrollBarVisibility of the RadDiagram to Visible, but only ScrollBars.

I'm a little bt stuck on this issue.

Did I did/understand something wrong about this or is there any way to change the standard move effect on the RepeatButton of the RadDiagram ScrollBars ? 

Thanx a lot for reading this, and maybe help me :D


Adrien
Top achievements
Rank 1
 answered on 13 Jan 2021
6 answers
392 views

I want to change some controls to fluent.light style in the default fluent.dark style.

Load the Fluent.Dark when the program start.

 

MainWindow.xaml.cs

public MainWindow()
{
    FluentPalette.LoadPreset(FluentPalette.ColorVariation.Dark);
    InitializeComponent();
}

 

However, some of the screens are bright, I would like to apply the Fluent.Light style to specific control.
(ex, Telerik controls and default controls(buttons etc))

Different styles have theme xaml. so I can overwrite them, but Fluent seems different.

When the entire style is defined, is there a way to change the control from Fluent.Dark to Fluent.Light in some UI groups (such as Grid)?

 

 

 

 

Carlton
Top achievements
Rank 1
 answered on 13 Jan 2021
3 answers
181 views

Hi All,

Any Idea to Notify in Drop(DragDropState state) of which Parent Class is ListBoxDragDropBehavior. I am Doing Drag and Drop operation in Rad:ListBox Control. Need to identify whether I am Dragging the ListBoxItem from top to down or down to top in Drop(DragDropState state  method of the behavior. I have attached a sample image(dragvisual.jpg) for reference.

Thanks in Advance!

Regards,

Kishore Kumar

Dinko | Tech Support Engineer
Telerik team
 answered on 12 Jan 2021
2 answers
211 views

Hi there, I am using a radgridview and want to allow users to select a format for data within columns, testing this for dates I noticed that it wasn't working for expression columns that contain a string representation of the data rather than a type such as DateTime, if I make one using Now() or Today() the format string does appear to work, is there a way to parse data in an expression column into a datatype?

Jack
Top achievements
Rank 1
 answered on 12 Jan 2021
9 answers
308 views

Hello. I used the sample provided by the SDK. (GridView - Group Selecction)

There was a problem with group sorting.

 

Please check the image for details.

 

 

In sdk Source (MyBehavior.cs) ======================================

private IEnumerable<object> GetSubGroupItems(IGroup gr)
{
if (!gr.HasSubgroups)   â˜… <<<< This alert  (System.NullReferenceException: Object reference not set to an instance of an object.)
{
return gr.Items.OfType<object>();
}
else
{
List<object> items = new List<object>();
foreach (var subGr in gr.Subgroups)
{
items.AddRange(GetSubGroupItems(subGr));
}
return items;
}
}

========================================================================================

 

I want to sort by header group. Could you solve it?

Thanks.

 

Martin Ivanov
Telerik team
 answered on 11 Jan 2021
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?