Telerik Forums
UI for WPF Forum
0 answers
265 views
I have a <Grid> which has two <ItemsControl> in it.
The first <ItemsControl-1> will be vertically placed and second <ItemsControl-2> will be horizontally placed.
Each <ItemsControl> will have same number of counts as child items.
I have attached a snap for reference(MockUI Changes.jpeg) of how it looks like. 
Be default the items in <ItemsControl> height is set to AUTO and it has lot of sub-control(telerik) in it and height of the ItemControl.items may vary based on datatrigger set for the viewmodel property. 
I want to synchronize Height of ItemsControl1.Item1 with ItemsContol2.Item.(ex:during runtime if the height of ItemControl1.Item1 is 20 then ItemControl2.Item1 must also be same).
Any Idea or suggestion or samples to implement this behavior.


Thanks and Regards,
Kishore
Kishorekumar
Top achievements
Rank 1
Veteran
 asked on 19 Apr 2021
10 answers
385 views

Hi,

I'm creating a custom localization manager, because my Culture is not supported and my client want to have everything in native language. LocalizationManager with 

 

public override string GetStringOverride(string key)
        {
            switch (key)
            {
            }
 
         return base.GetStringOverride(key);
         }

 

is a great and simple tool to use. But I need some keys, which are not mentioned in telerik documentation. Currently I need those for week days and month names. Can you provide them please?

 

Best regards

Stefan Schmiedl
Top achievements
Rank 2
 answered on 16 Apr 2021
1 answer
492 views

Hi, 

I've got a RadRibbonWindow like main window of my project.

I don't need the RadRibbonView but I would like to hide the title bar and insert the min/max/close button on my bar.

I attach the before and after pictures to understand that I intend.

How I can do this?

Thanks

 

Martin Ivanov
Telerik team
 answered on 16 Apr 2021
5 answers
414 views
Hello,

I've created a custom theme using the telerik-approach.
Everything seems to work except for the RadRibbonWindow.
I've placed RadRibbonWindow.IsWindowsThemeEnabled = false; in the static constructor.
Does custom theming for RadRibbonWindow require any extra code or is it supported at all?
Dilyan Traykov
Telerik team
 answered on 15 Apr 2021
5 answers
350 views

We are working on project and using Telerik with MVVM approach using Prism framework.
We want to notify user about some tasks or messages for which we have used RadNotifyIcon.
We are able to notify user but we want to give a link in the notification on click of which user will be redirected to some internal Menu page(a XAML page within the application).
For Menu control we have used Rad Navigation View(Hamburger Menu) and it is working fine when navigated from one menu to another.
We are facing a challenge in achieving the same using PRSIM MVVM approach. We are not getting the click event(Command) of the hyperlink present in NotifyIcon to ViewModel to navigate to the view.
Kindly help us to achieve this. Below is our code let us know where are we going wrong or is there any other way to navigate to existing view using Radnotifyicon link click?

We have tried RadHyperlink control as well as RadRadioButton. Both are not working

Below is the designer code:

<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:av="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:prism="http://prismlibrary.com/"
    mc:Ignorable="av" x:Class="Voyager.Views.Notifications"
    prism:ViewModelLocator.AutoWireViewModel="True"
             av:DesignWidth="718.431" av:DesignHeight="416.528">
    <UserControl.Resources>
        <DataTemplate x:Key="CalloutContentTemplate">
            <StackPanel Width="300">
                <telerik:RadButton Cursor="Hand" IsBackgroundVisible="False"
                                   Padding="0" VerticalAlignment="Top" HorizontalAlignment="Right"
                                   Command="{x:Static telerik:WindowCommands.Close}">
                    <telerik:RadGlyph Glyph="&#xE11B;"/>
                </telerik:RadButton>
                <Image Source="/Images/Splash3.PNG" />
                <TextBlock TextWrapping="Wrap" MaxWidth="200" x:Name="Notification" FontWeight="Bold"  Margin="0 0 0 10"/>

<!--<telerik:RadHyperlinkButton x:Name="RadHyperlinkButton1" Content="Click here to open Telerik WPF Documentation"  Command="{Binding MyCommand}" CommandParameter="InternetUsage"-->
                <telerik:RadRadioButton Command="{Binding MyCommand}"
                                    CommandParameter="InternetUsage"
                                    Tag="ACTIVITIES" Style="{StaticResource RadRadioButtonLargeStyle}"/>
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="NotifyIconPopupContentTemplate">
            <telerik:RadCallout x:Name="CalloutButton"  ArrowAnchorPoint="0.8,1.1"
                                ArrowBasePoint1="1,0.5"
                                ArrowBasePoint2="0.6,0.5"
                                ArrowType="Triangle"
                                Padding="10 15"
                                TextAlignment="Left"
                                Margin="30"
                                ContentTemplate="{StaticResource CalloutContentTemplate}"/>
        </DataTemplate>
    </UserControl.Resources>
    <Grid HorizontalAlignment="Center" VerticalAlignment="Center" FocusManager.FocusedElement="{Binding ElementName=ShowNotifyIconButton}">
        <Border BorderThickness="1" BorderBrush="#33000000" Width="500">
            <StackPanel VerticalAlignment="Stretch">
                <TextBlock HorizontalAlignment="Center" Foreground="#FF333333" Margin="0 30 0 35" FontSize="24" Text="Welcome to RadNotifyIcon demos"/>
                <TextBlock HorizontalAlignment="Center" Margin="0 0 0 10" FontSize="16" Text="Click on the button below to show the NotifyIcon in the tray area."/>
                <TextBlock HorizontalAlignment="Center" Foreground="#FF0099BC" FontSize="12" Text="Note, that the icon may be hidden in the overflow area of the notification tray."/>
                <telerik:RadButton x:Name="ShowNotifyIconButton"
                                   Loaded="OnShowNotifyIconButtonLoaded"
                                   HorizontalAlignment="Center" MinWidth="170" Margin="0 40 0 30" Content="Show NotifyIcon" Click="OnShowNotifyIconButtonClick" />
                <telerik:RadNotifyIcon x:Name="NotifyIcon"
                                       ShowTrayIcon="True"
                                       TrayIconSource="/Images/voyager_icon_green.ico"
                                       PopupContentTemplate="{StaticResource NotifyIconPopupContentTemplate}" PopupShowDuration="10000" TrayIconMouseUp="NotifyIcon_TrayIconMouseUp"/>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>

Below is the ViewModel code:

 

   public class NotificationsViewModel : BindableBase
    {
        public IRegionManager _regionManager = null;
        public NotificationsViewModel(IRegionManager regionManager)
        {
            _regionManager = regionManager;
            MyCommand = new DelegateCommand<string>(OnCommandExecuted);
        }
        private void OnCommandExecuted(string url)
        {
            Navigate(url);
        }

        public ICommand MyCommand { get; set; }
        public void Navigate(string navigatePath)
        {
            _regionManager.RequestNavigate("ContentRegion", navigatePath);
        }
    }

 

 

Dilyan Traykov
Telerik team
 answered on 15 Apr 2021
2 answers
159 views

Hello, i tried to create radWindow as main window. I followed Your tutorial and it working well, except maximizing of window. When maximize button is pressed, then it only move to top left corner, but app itself stays in same size. Attached screenshot of maximized window. 

<telerik:RadWindow x:Name="MainWin1" x:Class="BORIS_OIL.MainWin"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:local="clr-namespace:BORIS_OIL"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:lang = "clr-namespace:BORIS_OIL.Properties"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:navigation="clr-namespace:Telerik.Windows.Controls.Navigation;assembly=Telerik.Windows.Controls.Navigation"
        navigation:RadWindowInteropHelper.ShowInTaskbar="True"
        navigation:RadWindowInteropHelper.Icon="/Resources/aspera.ico"
        
        Header="{x:Static lang:Resources.App_Name}"  HorizontalAlignment="Center" VerticalAlignment="Center" WindowStartupLocation="CenterScreen" MinWidth="1366" MinHeight="768"  ResizeMode="CanResize" 
                >
    <telerik:RadWindow.Resources>
        
        <local:MainMenuViewModel x:Key="ViewModel" />
        <telerik:StringToGlyphConverter x:Key="StringToGlyphConverter" />

        <Style TargetType="telerik:RadNavigationViewItem" >
            <Setter Property="Content" Value="{Binding Title}" />
            <Setter Property="Icon" Value="{Binding IconGlyph}" />
            <Setter Property="IconTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <telerik:RadGlyph Glyph="{Binding Converter={StaticResource StringToGlyphConverter}}" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <DataTemplate x:Key="TransitionControlContentTemplate">
            <TextBlock Margin="10" Text="{Binding Title}" />
        </DataTemplate>

    </telerik:RadWindow.Resources>
    
    <Grid>
        <telerik:RadNavigationView DataContext="{StaticResource ViewModel}"  ItemsSource="{Binding Items}" PaneHeader="Menu" >
            <telerik:RadNavigationView.Content>
                <telerik:RadTransitionControl Content="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType=telerik:RadNavigationView}}" ContentTemplate="{StaticResource TransitionControlContentTemplate}" Foreground="Black" Duration="0:0:0.4">
                    <telerik:RadTransitionControl.Transition>
                        <telerik:FadeTransition />
                    </telerik:RadTransitionControl.Transition>
                </telerik:RadTransitionControl>
            </telerik:RadNavigationView.Content>
        </telerik:RadNavigationView>
    </Grid>
    

Dinko | Tech Support Engineer
Telerik team
 answered on 15 Apr 2021
4 answers
167 views

Hi team,

I am using MVVM to create nodes, graphs and links. And i manage to create custom connectors with the help of this thread. But now i want to create custom connections, which means attach to specific custom connectors and add several connections points. Any tutorial showing how to do this?

 Thanks,

Jingfei

Dinko | Tech Support Engineer
Telerik team
 answered on 15 Apr 2021
1 answer
497 views

Hello,

I am using a RadGridView to show my Data. In this View I have a TextColumn with a Status. Now I want to bind a Enum with this Status to show my Value from the Enum in the RadGridView. My attempt was to define a property to return the StatusStype compared to the Status from my current Item.

But I do not exactly know how to do this. Or is there a better way?

Hope for some help :-)

My View

<telerik:RadGridView ItemsSource="{Binding Items}">
       <telerik:RadGridView.Columns>
         <telerik:TextColumn Header="Document" BindingValue="Document"/>
         <telerik:TextColumn Header="Status" BindingValue="StatusType"/>
       </telerik:RadGridView.Columns>
</telerik:RadGridView>

 

My Enum

public enum StatusTypes
    {
        [Description("Open")]
        Offen = 0,
        [Description("In Process")]
        InProcess = 1,
        [Description("Closed")]
        Closed = 2,
    }

 

My Model

public class MyModel
    {
        public string Document{ get; set; }
  
        public decimal Status { get; set; }
 
        public StatusTypes StatusType
        {
            get
            {
                return Status = StatusTypes
            }
        }
Vladimir Stoyanov
Telerik team
 answered on 14 Apr 2021
4 answers
115 views

I have a RadGrid that is bound to a ObservableCollection<Customer>. Users can click the RadGrid rows and create an ExpressionColumn using ExpressionEditor. I set ExpressionEditor.Item like:

RadExpressionEditor expressionEditor = new RadExpressionEditor();
expressionEditor.Item = this.myRadGrid.SelectedItem;

 

Users can create an expression like 'Customer.BankBalance + 100' and it gets added to the RadGrid:

 

private GridViewExpressionColumn expressionColumn = new GridViewExpressionColumn();
 
this.expressionColumn.Expression = expressionEditor.Expression;
this.expressionColumn.Header = "Test";
if (!this.myRadGrid.Columns.Contains(this.expressionColumn))
{
     this.myRadGrid.Columns.Add(this.expressionColumn);
}

How can I now use the newly created "Test" expression column in another ExpressionColumn by repeating the process the user has just done? So they would select a row but the "Test" column is now available to use in the ExpressionEditor and they could do an expression like "Test + 100".

YBOT
Top achievements
Rank 1
Veteran
 answered on 14 Apr 2021
1 answer
185 views

Hello,

I am using MVVM in RadDiagram.

I am facing a binding error when using style bindings to apply bindings on the RadDiagramShape properties. The binding works, but the error is a little bit anoying.

This is my XAML:

<Style TargetType="telerik:RadDiagramShape" BasedOn="{StaticResource RadDiagramShapeStyle}">
    <Setter Property="Background">
        <Setter.Value>
            <LinearGradientBrush>
                <LinearGradientBrush.GradientStops>
                    <GradientStop Offset="0" Color="{Binding BkgrdGradientColor1}" />
                    <GradientStop Offset="1" Color="{Binding BkgrdGradientColor2}" />
                </LinearGradientBrush.GradientStops>
            </LinearGradientBrush>
        </Setter.Value>
    </Setter>

 

This is the binding error:

Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=BkgrdGradientColor1; DataItem=null; target element is 'GradientStop' (HashCode=57039000); target property is 'Color' (type 'Color')

Can you help me with that?

regards,

Tobias

Peter
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 14 Apr 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
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?