Telerik Forums
UI for WPF Forum
0 answers
346 views

Binding and using this control feels quite terrible at its current state. 

My case: I want to display "HH:mm" .. as Maskk = "##:##" 

Value binding happily accepts string "10:00"

but while editing the value the propertychanged event can return "1000" which isn't compatible with the converter i've made. 

Text binding ONLY works in Mode=OneWayToSource in combination with Value binding Mode=OneWay 

Text="{Binding ToTime, Mode=OneWayToSource}"
Value="{Binding ToTime, Mode=OneWay}"

HOWEVER - when binding like this, the control doesnt clear the text when bound value changes to NULL 

eg: ToTime was "10:00" changes to NULL

The control keeps displaying "10:00"

Changing UpdateSourceTrigger from PropertyChanged to LostFocus makes the control completely faulty.. it simply stops displaying. 

ARGH

Why on earth is there two binding fields - where both are so faulty ? 

I wish there was only ONE : the Text field. 

This field should emit the masked value, whenever the UpdateSourceTrigger dictates. 

This Text field should accept "1000" as well as "10:00" but ALWAYS return "10:00" in the propertychanged event.

I'm considdering using a completely different control from another vendor instead of this mess :( 

Martin
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 27 Oct 2022
1 answer
227 views

I would like to create a MapEllipse from Code Behind using values that I have stored.

But the property Center only has a get method.

How can I determine the Center of the MapEllipse from Code Behind?

 

 

var mapEllipse = new MapEllipse();
mapEllipse.Width = mapEllipse.Height = 50;
mapEllipse.Fill = Brushes.Yellow;
mapEllipse.Opacity = 0.2;
mapEllipse.Stroke = Brushes.Red;
mapEllipse.StrokeThickness = 2;
//mapEllipse.Center = ?

 

Thanks

 

Dilyan Traykov
Telerik team
 answered on 27 Oct 2022
1 answer
225 views

Hello, 

Is it possible to have content display vertically in the RadExpander, and collapse horizontally as seen in the attached image?

We need the arrow buttons to be on the right and the expander to collapse to the left.

Thanks

Martin Ivanov
Telerik team
 answered on 27 Oct 2022
0 answers
217 views

Hi,

I'm using a customized style for RadCombobox.

The problem is, I found it impossible to reverse the dropdown button(arrow) when it is clicked.

I want the arrow to go up when the combobox expands and go down when the combobox collapses.

 

Can Anyone give me an example code of this?

Jinny
Top achievements
Rank 1
 asked on 27 Oct 2022
1 answer
355 views

Hey,

I downloaded the demo code and created a control called "RadRichTextBoxToolBarControl". This control contains many controls:  RadRibbonComboBox to change font Family and Size, FormattingColorPicker to change text color, etc.

The DataContext of the control is RadRichTextBox, Path=Commands.

This way allowed to have all the functionality with zero code behind.

The RichTextBox gets the style according to the RadRichTextBoxToolBarControl as expected.

The problem is that after I wrote some text and change the text style (font family, size, color) then I should click the end of the line to have the focus on the RichTextBox and start typing.

The problem is that the new text uses the style of the text to the left of the cursor instead of the styling configured in the toolbar. 
I would like to have the same behavior as word. While typing or selecting text, the style should be inherited from the toolbar options.

Unfortunately, I can't share my code but I think that the explanation is enough.

Vladislav
Telerik team
 answered on 26 Oct 2022
1 answer
144 views

I want show something like the Telerik ExplorerControl in folder-browser mode.  But in my control, I need certain folders are shown with a custom icon /view that will reflect the contents of the folder.   I love all the tree-view functionality of the control and do not want to re-invent all of that.  but I need the main pane to show my view, not Telerik's

Basically when ever a folder contains a file named "scan.yaml" and "image01.png", I want my UI to show the contents of "image01.png" as the folder instead of the regular folder icon.  (My code actually does some background processing to overlay other information on that image sometimes but that's not important for now)

Is this possible or would I need to use my own Tree View?

I thought of a few approaches.  Can you tell me which, if any of these are feasible and which would work best?

1.  Use a ControlTemplate that totally replaces the contents of`PART_MainPane` which is currently this

<historyNavigationPane:FileBrowserTabControl x:Name="PART_MainPane"
        Grid.Column="2"
        SelectedIndex="{Binding ElementName=PART_LayoutConfigurator, Path=SelectedIndex}"
        ItemsSource="{Binding Layouts}"
        ContentTemplateSelector="{StaticResource MainPaneTabControlTemplateSelector}">

 Is it feasible to use a style for ExplorerControl with a ControlTemplate  that completely tears that out and replaces that `FileBrowserTabControl` it with my own control? 

2. Use a ControlTemplate that does not show the MainPane at all and just puts my custom control next to the existing tree view.  My control could then key off its sibling's `CurrentDirectory` property

3. Try to find some way to customize how FileBrowserTabControl shows the folder contents as I described

Would any of these work.

I've attached an image of part of what my control looks like in large-icon mode.  It shows two regular folders and two of the "special" folders that I mentioned

(Also I looked for a question tag for ExplorerControl but could not find one so I tagged "General Discussion")


Dilyan Traykov
Telerik team
 answered on 26 Oct 2022
1 answer
249 views

I have TreeLinesVisibility="Visible" on my TreeListView, as in the XAML snippet below.

<telerik:RadTreeListView x:Name="NEWCollectionControl" Grid.Row="1" EnableLostFocusSelectedState="False" ShowColumnHeaders="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadOutlookBar}}, Path=DataContext.Controller.ShowTreeHeader, Mode=TwoWay}" GridLinesVisibility="None" RowIndicatorVisibility="Collapsed" SelectionUnit="FullRow" ColumnWidth="*" TreeLinesVisibility="Visible" AutoExpandItems="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadOutlookBar}}, Path=DataContext.Controller.TreeViewAutoExpand, Mode=TwoWay}" AutoGenerateColumns="False" ItemsSource="{Binding Items}" IsExpandedBinding="{Binding IsExpanded, Mode=TwoWay}" SelectedCellsChanging="NEWCollectionControl_SelectedCellsChanging" DataLoaded="NEWCollectionControl_DataLoaded" Initialized="NEWCollectionControl_Initialized" SelectionChanged="NEWCollectionControl_SelectionChanged">
    <telerik:RadTreeListView.ChildTableDefinitions>
        <telerik:TreeListViewTableDefinition ItemsSource="{Binding Items}" />
    </telerik:RadTreeListView.ChildTableDefinitions>
    <telerik:RadTreeListView.Columns>
        <telerik:GridViewImageColumn IsVisible="{Binding Controller.UseTreeViewIcons}" DataMemberBinding="{Binding Image}" TextAlignment="Left" ImageHeight="12" ImageWidth="{Binding ImageWidth}" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Translation.CurrentTranslation}" MinWidth="200" Header="{Binding Controller.PSRDictionary.Collection.CurrentTranslation}" />
    </telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>

However, the GridViewImageColumn, which was added later in order to allow for some icons to the side of the TreeListView, is causing elements of the 3rd hierarchy level onwards to not have those lines. The behaviour can be seen in the image below, and it will happen regardless if the column is visible or not. 

I have tried to mess with many of the properties on these elements but to no success.

 

 

Stenly
Telerik team
 answered on 25 Oct 2022
1 answer
178 views

Hello,

I'm generating columns dynamically, I have a RadGridView with LeftFrozenColumnCount = 1.
It is possible that my grid becomes not visible (for exemple, when switching tab in a TabControl).

But the columns my grid is bound to can still be re-generated.
It seems that way, the grid doesn't update the IsFrozen property of the columns.

I assume this is because the CoerceValueCallback for this propery checks for null on each column.DataControl and if so, returns the base value for the property, which in my case is always equal to false, because I've just generated the columns and they didn't get to the view yet.

I rely on this IsFrozen property to do some custom filtering logic, and it doesn't execute properly because the IsFrozen property isn't updated reliably.

I don't have any issue when coming back to the grid, because the IsFrozen property is then updated correctly: the real problem is in that this property isn't updated properly if the grid is not visible and we change the columns it's bound to.

What can I do to work around this?

Thanks! :)

Petar Mladenov
Telerik team
 answered on 24 Oct 2022
1 answer
193 views
I have a Telerik RadSplitButton defined as follows:
<telerik:RadSplitButton Style="{StaticResource MySplitButtonStyle}" Content="Some Text" DropDownHeight="150">
  <telerik:RadSplitButton.DropDownContent>
    <ListBox>
      <ListBoxItem Content="Item 1" />
      <ListBoxItem Content="Item 2" />
      <ListBoxItem Content="Item 3" />
      <ListBoxItem Content="Item 4" />
      <ListBoxItem Content="Item 5" />
    </ListBox>
  </telerik:RadSplitButton.DropDownContent>
</telerik:RadSplitButton>
I am using the NoXaml version of the assemblies and so I have styled the split button based on a style that I got from a Telerik theme (Telerik.Windows.Controls.xaml file).  The style contains the following:
<Style x:Key="MySplitButtonStyle" TargetType="telerik:RadSplitButton">
  ...
  <Setter Property="ButtonPartStyle" Value="{StaticResource MyButtonStyle}"/>
  <Setter Property="IsToggle" Value="False"/>
  <Setter Property="IsTabStop" Value="True" />
  <Setter Property="IsOpen" Value="False" />
  <Setter Property="CloseOnPopupMouseLeftButtonUp" Value="True" />
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="telerik:RadSplitButton">
        ...
      </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>

When I use the Tab-Navigation to cycle through the controls on the page (because I have no mouse for example), this RadSplitButton gets the focus as expected.  So far so good.  However, when I then try to interact with this RadSplitButton using the keyboard (because I have no mouse) I can't seem to get the main button to activate and I cannot change the selected item in the drop-down.

When the RadSplitButton has focus:

- When I press the Spacebar or the Enter key, the drop-down opens but no events fires.  I would expect the button to get clicked or the Activate event to get fired.

- When I press the down-arrow key the drop-down opens and shows me the list box but the list box does not get keyboard focus and so I cannot navigate (using keys).  I cannot select an item from the drop-down as I can with a normal list box.

Can you suggest some changes that might help me to fix this?  Ideally, I would like to do this from the style and not have to add event handlers to every SplitButton.

Thanks
Vladimir Stoyanov
Telerik team
 answered on 24 Oct 2022
0 answers
173 views
i want to add a cubic bezier curve to a canvas with a start point and an end point, i cant do it in the xaml it has to be in the c# because the points are constantly changing
Conrad
Top achievements
Rank 1
 asked on 22 Oct 2022
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?