Telerik Forums
UI for WPF Forum
1 answer
293 views

I am using the Fluent theme implicitly (noxaml). If I use a standard Window as my main window, it appears correctly and the controls are properly themed.

However, if I change the main window to use RadWindow (and make the appropriate change to override OnStartup in App.xaml), at runtime the window does not appear.

I'm thinking that it may be that the RadWindow is rendering before the styling has been loaded. The RadWindow does render correctly in the designer.

Any thoughts on this?

Martin Ivanov
Telerik team
 answered on 09 Jul 2020
1 answer
117 views
Is there any way to delete DocumentLists from a RadDocument? I don't want to create a new RadDocument because I will lose the styles that I applied. 
Martin
Telerik team
 answered on 09 Jul 2020
18 answers
284 views
Hi.
I need show after day in calendar some number.
This my sources:
<telerik:RadDateTimePicker>
    <telerik:RadDateTimePicker.CalendarStyle>
        <Style TargetType="{x:Type telerik:RadCalendar}">
            <Setter Property="DayTemplateSelector" Value="{StaticResource CalendarCountTask}"/>
        </Style>
    </telerik:RadDateTimePicker.CalendarStyle>
</telerik:RadDateTimePicker>
<a:CustomTemplateSelector x:Key="CalendarCountTask">
    <a:CustomTemplateSelector.DefaultTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding Text}"/>
        </DataTemplate>
    </a:CustomTemplateSelector.DefaultTemplate>
    <a:CustomTemplateSelector.CustomTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding Text}" Foreground="RoyalBlue"/>
        </DataTemplate>
    </a:CustomTemplateSelector.CustomTemplate>
</a:CustomTemplateSelector
public class CustomTemplateSelector : DataTemplateSelector
{
    public override DataTemplate SelectTemplate(object item, DependencyObject container)
    {
        CalendarButtonContent content = item as CalendarButtonContent;
        foreach (KeyValuePair<DateTime, short> oneDay in winDebtorInfo.TaskCountList)
        {
            if (oneDay.Key == content.Date)
            {
                content.Text += "(" + oneDay.Value + ")";
                return CustomTemplate;
            }
        }
        return DefaultTemplate;
    }
 
    public DataTemplate DefaultTemplate
    {
        get;
        set;
    }
 
    public DataTemplate CustomTemplate
    {
        get;
        set;
    }
}
>

winDebtorInfo.TaskCountList is source for days, for which there is number for showing.

This working, but sometimes there is exception:

System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Windows.WeakReferenceList`1.WeakReferenceEnumerator.get_Current() at Telerik.Windows.Controls.SelectionChanger`1.SynchronizeInternalSelection() at Telerik.Windows.Controls.SelectionChanger`1.End() at Telerik.Windows.Controls.SelectionChanger`1.AddJustThis(T item) at Telerik.Windows.Controls.RadCalendar.AddToSelection(DateTime selectedDate, Boolean controlKeyDown, Boolean shiftKeyDown) at Telerik.Windows.Controls.RadCalendar.Select(DateTime selectedDate, Boolean forceSelection) at Telerik.Windows.Controls.Calendar.CalendarView.AddDate(Object sender) at Telerik.Windows.Controls.Calendar.CalendarView.HandleMouseEvents(Object sender, MouseButtonEventArgs e) at Telerik.Windows.Controls.Calendar.CalendarView.CalendarButtonMouseLeftButtonDown(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

What would it be?
Thank you.

Vladimir Stoyanov
Telerik team
 answered on 09 Jul 2020
1 answer
214 views

Hi there,

I'm trying to display a range series that is defined by a collection and a gap.

The ObservableCollection is defining the upper limit. The lower limit is defined by the upper limit minus the gap.

For this display I want to use a value converter that returns the lower limit for each upper limit.

<telerik:RadCartesianChart>
    <telerik:RadCartesianChart.HorizontalAxis>
        <telerik:CategoricalAxis />
    </telerik:RadCartesianChart.HorizontalAxis>
    <telerik:RadCartesianChart.VerticalAxis>
        <telerik:LinearAxis/>
    </telerik:RadCartesianChart.VerticalAxis>
    <telerik:RadCartesianChart.Series>
        <telerik:RangeSeries ItemsSource="{Binding Path=SensorParameter.Range_UpperLimit}" HighBinding="Range_UpperLimit" CategoryBinding="RPM">
            <telerik:RangeSeries.LowBinding>
                <MultiBinding Converter="{StaticResource ConvertOKLowValue}">
                    <Binding Path="Range_UpperLimit" />
                    <Binding Path="Range_Gap" />
                </MultiBinding>
            </telerik:RangeSeries.LowBinding>
        </telerik:RangeSeries>
    </telerik:RadCartesianChart.Series>
</telerik:RadCartesianChart>

 

The SensorParameter struct looks like this:

01.public class RPM_Range : ObservableObject
02.{
03.    public float Range_Gap { get; set; }
04.    public ObservableCollection<Range_Limit> Range_UpperLimit { get; set; }
05.}
06. 
07.public class Range_Limit: ObservableObject
08.{
09.    public float RPM
10.    {
11.        get; set;
12.    }
13. 
14.    public float OK_Range_UpperLimit
15.    {
16.        get; set;
17.    }
18.}

 

The value converter is implemented like this:

01.public class RangeSeriesLowConverter : IMultiValueConverter
02.{
03.    public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
04.    {
05.        double? _RangeUpperLimit = values[0] as double?;
06.        double? _RangeGap = values[1] as double?;
07.        if (_RangeUpperLimit - _RangeGap < 0)
08.            return 0;
09.       return _RangeUpperLimit - _RangeGap;
10.    }
11. 
12.    public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
13.    {
14.        throw new NotImplementedException();
15.    }
16.}

 

UpperLimit binds correctly. But I'm not getting the binding to the lower limit correctly. While debugging the value converter is called, but the arguments are not passed correctly.

Is there a restriction using value converters for the low binding?

 

Thanks in advance for your help.

Kindly

Philipp

Martin Ivanov
Telerik team
 answered on 09 Jul 2020
1 answer
404 views

I reproduced the "First Look" example program code in "NotifyIcon" in the "NotifyIcon" in "WPF Controls Examples" program in a project created on a personal computer.
It is executed.
However, the popup does not appear when the button is pressed.
If you write the code using the "NotifyIcon" introduced on the "Telerik UI" site, the results are the same.
It runs, but no popup appears.
Simply submit the code you wrote below.
Can you tell me what the problem is?

 

MainWindow.xaml.cs
        private void OnShowNotification(object sender, RoutedEventArgs e)
        {
            this.icon.ShowBalloonTip();
        }

 

MainWindow.xaml

    Button Content="Show notification" Click="OnShowNotification" /> 
    <telerik:RadNotifyIcon 
        x:Name="icon" 
        BalloonText="Balloon Text" 
        BalloonTitle="Balloon Title" 
        TrayIconSource="black.ico" 
        BalloonIconSource="black.ico"> 
    </telerik:RadNotifyIcon> 

 

 

Martin Ivanov
Telerik team
 answered on 08 Jul 2020
3 answers
190 views

Hello,

In the Windows Explorer, you can change the view using Ctrl+Mouse Wheel.

Your file dialogs should do the same.

Dinko | Tech Support Engineer
Telerik team
 answered on 07 Jul 2020
4 answers
110 views

Hello,

The following resources are wrong in French:

  • FileDialogs_FileSizes_B, should be "octets" instead of "bytes".
  • FileDialogs_FileSizes_GB, should be "Go" instead of "GB".
  • FileDialogs_FileSizes_KB, should be "ko" instead of "KB".
  • FileDialogs_FileSizes_MB, should be "Mo" instead of "MB".
  • FileDialogs_FileSizes_TB, should be "To" instead of "TB".
  • FileDialogs_OpenFolderDialogHeader, should be "Sélectionner un dossier" instead of "Ouvrir le dossier".
  • FileDialogs_OpenFolder, should be "Sélectionner le dossier" instead of "Ouvrir le dossier".
  • FileDialogs_DateHeader: should be "Modifié le" instead of "Date de modification ".
  • FileDialogs_Back, should be "Précédent" instead of "Retour".
  • FileDialogs_Forward, should be "Suivant" instead of "Transférer".
  • FileDialogs_Up, should be "Dossier parent " instead of "En haut".
  • FileDialogs_CopyTo: should be "Copier sur" instead of "Copier a". (there's a typo in "Copier a", as the "a" must take a grave accent in this case: "à").
  • FileDialogs_MoveTo: should be "Déplacer vers " instead of "Déplacer".

Note for English:

  • The official SI abbreviation for "kilo" is a lowercase "k", not an uppercase one, so it should be "kb" in English, not KB, and so on.
  • For the RadOpenDialogFolder, we don't "open" a folder, but "select" it, This should be changed in the resources, but also in the documentation (and even in the class name!).

It's also strange that the FileDialogs_InvalidOrMissingExtension resource says something completely different: "If you change a file name extension, the file might become unusable". Some thing for the FileDialogs_InvalidExtensionConfirmation resource.

Martin Ivanov
Telerik team
 answered on 07 Jul 2020
4 answers
492 views

Hello,

In the Windows Explorer, it is possible to use the Alt+Left keyboard shortcut for Back and the Alt+Right shortcut for Forward.

Your file dialogs should do the same.

Patrick
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 07 Jul 2020
2 answers
122 views
Is it possible to select an item programatically? After I bind the TreeMap control I would like to select a default item.
Martin Ivanov
Telerik team
 answered on 06 Jul 2020
6 answers
428 views

Thoughts on what I'm doing wrong here?  If I collapse a ListBoxItem, why does the RadListBox control on partially collapse it?  It still has a height of a couple of pixels when the bound property for visiblity is set to Visibility.Collapsed.

<telerik:RadListBox Name="MainListControl" Grid.Row="3" 
                       VerticalAlignment="Stretch"
                        VerticalContentAlignment="Stretch"
                        HorizontalAlignment="Stretch"
                        HorizontalContentAlignment="Stretch"
                        Background="White"
                        Margin="0,0,0,0"
                        ItemsSource="{Binding Path=HumanResources,Mode=TwoWay}" >
            <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                </ItemsPanelTemplate>
            </telerik:RadListBox.ItemsPanel>
            <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"  Visibility="{Binding Path=IsVisible, Mode=TwoWay,Converter={StaticResource localVisibilityConverter}}" >
                        <Grid.RowDefinitions>
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                         
                        <StackPanel Name="ButtonPanel" Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="3,3,3,3">
                            <telerik:RadButton x:Name="EditButton" Margin="3,3,3,3" Click="Edit_Click" Tag="{Binding Path=HumanResourceID}"  Content="{Binding Edit, Source={StaticResource GeneralStrings}}"   />
                        </StackPanel>
                        <TextBlock Grid.Column="1" x:Name="expanderCaption" HorizontalAlignment="Stretch" VerticalAlignment="Center"  Text="{Binding Path=Description}" Margin="3,3,3,3"  />
                    </Grid>
                </DataTemplate>
            </telerik:RadListBox.ItemTemplate>
        </telerik:RadListBox>
Dinko | Tech Support Engineer
Telerik team
 answered on 06 Jul 2020
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
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?