Telerik Forums
UI for WPF Forum
1 answer
191 views

If I designed with RadDiagramShape, I can Add/Remove RadDiagramShape in RadDiagram, though.

How can I Visible or Hidden Children nodes in RadDiagram when Node were clicked?

I made some source code for diagram like this:

    public class NodeBase : HierarchicalNodeViewModel
    {

        private long id;
        public long Id
        {
            get { return id; }
            set
            {
                if (id != value)
                {
                    id = value;
                    this.OnPropertyChanged("Id");
                }
            }
        }

         ...(Omit)...
    }

    public class LinkBase : LinkViewModelBase<HierarchicalNodeViewModel>
    {

        private eLinkTypes linkType;
        public eLinkTypes LinkType
        {
            get { return linkType; }
            set
            {
                if (linkType != value)
                {
                    linkType = value;

                    this.OnPropertyChanged("LinkType");
                }
            }
        }
         ...(Omit)...
    }

    public class FlowChartManager : ObservableGraphSourceBase<NodeBase , LinkBase>
    {
          public FlowChartManager()
        {
            PopulateGraphSource();
        }

        public FlowChartManager PopulateGraphSource()
        {
            //Add Nodes
            NodeBase processNode1 = new NodeBase ()
            {
                Position = new Point(10, 10),
                Content = "Process 1",
            }; base.InternalItems.Add(processNode1);

 

            NodeBase processNode2_1 = new NodeBase ()
            {
                Position = new Point(100, 100),
                Content = "Process 2-1",
            }; 

            NodeBase processNode2 = new NodeBase ()
            {
                Position = new Point(100, 100),
                Content = "Process 2",
            };processNode2 .Children.Add(processNode2_1);

             base.InternalItems.Add(processNode2);

 

            NodeBase processNode3 = new NodeBase ()
            {
                Position = new Point(200, 200),
                Content = "Process 3",
            }; base.InternalItems.Add(processNode3);           

 

            //Add Links
            base.InternalLinks.Add(new LinkBase(processNode1, processNode2) { LinkType = eLinkTypes.None, TargetCapType = Telerik.Windows.Diagrams.Core.CapType.Arrow1Filled });

         }

Dinko | Tech Support Engineer
Telerik team
 answered on 29 Mar 2016
6 answers
407 views
I'm having issues implementing a ControlTemplate for the RadPropertyGrid. When I create a ControlTemplate in Blend by editing a copy and subsequently add it to the resources of my view, the PropertyGridPresenter region of the control area no longer displays the bound property definitions, though the other visual regions remain intact. This occurs with AutoGeneratePropertyDefinitions in both "False" and "True" states. The generated template is below, am I missing something crucial?


        <ControlTemplate x:Key="RadPropertyGridControlTemplate" TargetType="{x:Type telerik:RadPropertyGrid}">
            <Border x:Name="PART_RootElement" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                <Grid x:Name="PART_PropertyGridContainer" Background="{TemplateBinding Background}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border x:Name="Header" BorderBrush="#FF848484" BorderThickness="0,0,0,1" Margin="0,0,0,-1">
                        <Border BorderBrush="White" BorderThickness="1">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="White" Offset="0"/>
                                    <GradientStop Color="#FFCDCDCD" Offset="1"/>
                                    <GradientStop Color="#FFCECECE" Offset="0.42"/>
                                    <GradientStop Color="#FFAFAFAF" Offset="0.43"/>
                                </LinearGradientBrush>
                            </Border.Background>
                            <Grid Margin="1">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <telerik:RadRadioButton x:Name="groupButton" Margin="0,0,3,0" Visibility="{TemplateBinding SortAndGroupButtonsVisibility}" Width="28">
                                    <telerik:StyleManager.Theme>
                                        <telerik:Office_BlackTheme/>
                                    </telerik:StyleManager.Theme>
                                    <telerik:RadRadioButton.ToolTip>
                                        <ToolTip Content="Categorize" telerik:LocalizationManager.ResourceKey="Categorize">
                                            <telerik:StyleManager.Theme>
                                                <telerik:Office_BlackTheme/>
                                            </telerik:StyleManager.Theme>
                                        </ToolTip>
                                    </telerik:RadRadioButton.ToolTip>
                                    <Path Data="M7.0000019,8.9999981L16.999998,8.9999981 16.999998,9.9999981 7.0000019,9.9999981z M7.0000019,6.9999995L16.999998,6.9999995 16.999998,7.9999995 7.0000019,7.9999995z M0,6L3.9999998,8.5 0,11z M6.999999,3.0000055L16.999996,3.0000055 16.999996,4.0000052 6.999999,4.0000052z M7.0000019,0.99999905L16.999998,0.99999905 16.999998,1.9999989 7.0000019,1.9999989z M0,0L4,2.5000002 0,5.0000005z" Fill="Black" Height="11" Stretch="Fill" SnapsToDevicePixels="True" StrokeThickness="0" Width="17"/>
                                </telerik:RadRadioButton>
                                <telerik:RadRadioButton x:Name="sortButton" Content="A-Z" Grid.Column="1" IsChecked="True" Visibility="{TemplateBinding SortAndGroupButtonsVisibility}" Width="28">
                                    <telerik:StyleManager.Theme>
                                        <telerik:Office_BlackTheme/>
                                    </telerik:StyleManager.Theme>
                                    <telerik:RadRadioButton.ToolTip>
                                        <ToolTip Content="Alphabetical" telerik:LocalizationManager.ResourceKey="Alphabetical">
                                            <telerik:StyleManager.Theme>
                                                <telerik:Office_BlackTheme/>
                                            </telerik:StyleManager.Theme>
                                        </ToolTip>
                                    </telerik:RadRadioButton.ToolTip>
                                </telerik:RadRadioButton>
                                <TextBox x:Name="searchAsYouTypeTextBox" Grid.Column="2" HorizontalAlignment="Stretch" Margin="2,0,0,0" telerik:TextBoxBehavior.SelectAllOnGotFocus="True" Text="{Binding FilterText, ElementName=PropertyGridPresenter, Mode=TwoWay}" telerik:TextBoxBehavior.UpdateTextOnEnter="True" telerik:TextBoxBehavior.UpdateTextOnTextChanged="True" Visibility="{TemplateBinding SearchBoxVisibility}">
                                    <telerik:StyleManager.Theme>
                                        <telerik:Office_BlackTheme/>
                                    </telerik:StyleManager.Theme>
                                </TextBox>
                                <Path Grid.Column="2" Data="M8.4939966,1.9999999C6.5610008,1.9999999 4.9939971,3.5670033 4.9939971,5.5 4.9939971,7.4329967 6.5610008,9 8.4939966,9 10.426993,9 11.993997,7.4329967 11.993997,5.5 11.993997,3.5670033 10.426993,1.9999999 8.4939966,1.9999999z M8.4939976,0C11.531564,-8.7786177E-08 13.993998,2.4624338 13.993998,5.5 13.993998,8.5375662 11.531564,11 8.4939976,11 7.3549109,11 6.2967014,10.65372 5.4188957,10.060686L5.3678761,10.025319 1.4142134,13.978982 0,12.564768 3.9563832,8.6083851 3.9333115,8.5751028C3.3402777,7.6972966 2.9939978,6.6390872 2.9939978,5.5 2.9939978,2.4624338 5.4564314,-8.7786177E-08 8.4939976,0z" Fill="#FF919191" HorizontalAlignment="Right" Height="14" Margin="4" Stretch="Fill" SnapsToDevicePixels="True" StrokeThickness="2" Visibility="{TemplateBinding SearchBoxVisibility}" Width="14"/>
                            </Grid>
                        </Border>
                    </Border>
                    <Border BorderBrush="#FF848484" BorderThickness="0,1" Grid.Row="1">
                        <ScrollViewer x:Name="PART_ItemsScrollViewer" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                            <telerik:StyleManager.Theme>
                                <telerik:Office_BlackTheme/>
                            </telerik:StyleManager.Theme>
                            <telerik:PropertyGridPresenter x:Name="PropertyGridPresenter" LabelColumnWidth="{Binding LabelColumnWidth, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" PropertyDefinitions="{Binding PropertyDefinitions, RelativeSource={RelativeSource TemplatedParent}}">
                                <telerik:PropertyGridPresenter.ContentTemplate>
                                    <Binding ElementName="groupButton" Path="IsChecked">
                                        <Binding.Converter>
                                            <telerik:ItemTemplateConverter>
                                                <telerik:ItemTemplateConverter.FlatTemplate>
                                                    <DataTemplate>
                                                        <ItemsControl>
                                                            <ItemsControl.ItemTemplate>
                                                                <DataTemplate>
                                                                    <telerik:PropertyGridField Content="{Binding}">
                                                                        <telerik:PropertyGridField.Resources>
                                                                            <Style x:Key="RadComboBox" TargetType="{x:Type telerik:RadComboBox}">
                                                                                <Setter Property="ItemContainerStyle">
                                                                                    <Setter.Value>
                                                                                        <Style TargetType="{x:Type telerik:RadComboBoxItem}">
                                                                                            <Setter Property="telerik:StyleManager.Theme">
                                                                                                <Setter.Value>
                                                                                                    <telerik:Office_BlackTheme/>
                                                                                                </Setter.Value>
                                                                                            </Setter>
                                                                                        </Style>
                                                                                    </Setter.Value>
                                                                                </Setter>
                                                                                <Setter Property="IsEditable" Value="True"/>
                                                                                <Setter Property="telerik:StyleManager.Theme">
                                                                                    <Setter.Value>
                                                                                        <telerik:Office_BlackTheme/>
                                                                                    </Setter.Value>
                                                                                </Setter>
                                                                            </Style>
                                                                            <Style x:Key="TextBox" TargetType="{x:Type TextBox}">
                                                                                <Setter Property="Padding" Value="3,2,0,2"/>
                                                                                <Setter Property="Background" Value="Transparent"/>
                                                                                <Setter Property="BorderBrush" Value="Transparent"/>
                                                                                <Setter Property="telerik:StyleManager.Theme">
                                                                                    <Setter.Value>
                                                                                        <telerik:Office_BlackTheme/>
                                                                                    </Setter.Value>
                                                                                </Setter>
                                                                            </Style>
                                                                            <Style x:Key="CheckBox" TargetType="{x:Type CheckBox}">
                                                                                <Setter Property="Margin" Value="3,2,0,2"/>
                                                                                <Setter Property="telerik:StyleManager.Theme">
                                                                                    <Setter.Value>
                                                                                        <telerik:Office_BlackTheme/>
                                                                                    </Setter.Value>
                                                                                </Setter>
                                                                            </Style>
                                                                        </telerik:PropertyGridField.Resources>
                                                                        <telerik:StyleManager.Theme>
                                                                            <telerik:Office_BlackTheme/>
                                                                        </telerik:StyleManager.Theme>
                                                                    </telerik:PropertyGridField>
                                                                </DataTemplate>
                                                            </ItemsControl.ItemTemplate>
                                                            <ItemsControl.Style>
                                                                <Style TargetType="{x:Type ItemsControl}">
                                                                    <Setter Property="BorderBrush" Value="#FF848484"/>
                                                                    <Setter Property="BorderThickness" Value="0,0,0,1"/>
                                                                    <Setter Property="Template">
                                                                        <Setter.Value>
                                                                            <ControlTemplate TargetType="{x:Type ItemsControl}">
                                                                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" VerticalAlignment="Top">
                                                                                    <ItemsPresenter/>
                                                                                </Border>
                                                                            </ControlTemplate>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                </Style>
                                                            </ItemsControl.Style>
                                                        </ItemsControl>
                                                    </DataTemplate>
                                                </telerik:ItemTemplateConverter.FlatTemplate>
                                                <telerik:ItemTemplateConverter.GroupTemplate>
                                                    <DataTemplate>
                                                        <ItemsControl>
                                                            <ItemsControl.ItemTemplate>
                                                                <DataTemplate>
                                                                    <Border BorderBrush="#FF848484" BorderThickness="0,1,0,0" Margin="0,-1,0,0">
                                                                        <Grid>
                                                                            <Grid.RowDefinitions>
                                                                                <RowDefinition Height="Auto"/>
                                                                                <RowDefinition Height="*"/>
                                                                            </Grid.RowDefinitions>
                                                                            <telerik:RadToggleButton x:Name="expandCollapseButton" BorderBrush="{x:Null}" Content="{Binding Key}" IsChecked="True">
                                                                                <telerik:RadToggleButton.Style>
                                                                                    <Style TargetType="{x:Type telerik:RadToggleButton}">
                                                                                        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                                                                                        <Setter Property="HorizontalContentAlignment" Value="Left"/>
                                                                                        <Setter Property="Height" Value="25"/>
                                                                                        <Setter Property="FontWeight" Value="Bold"/>
                                                                                        <Setter Property="Foreground" Value="Black"/>
                                                                                        <Setter Property="SnapsToDevicePixels" Value="True"/>
                                                                                        <Setter Property="BorderBrush" Value="#FF848484"/>
                                                                                        <Setter Property="Template">
                                                                                            <Setter.Value>
                                                                                                <ControlTemplate TargetType="{x:Type telerik:RadToggleButton}">
                                                                                                    <Grid>
                                                                                                        <Grid.ColumnDefinitions>
                                                                                                            <ColumnDefinition Width="Auto"/>
                                                                                                            <ColumnDefinition Width="*"/>
                                                                                                        </Grid.ColumnDefinitions>
                                                                                                        <Border x:Name="IconOuterBorder" BorderBrush="#FF848484" BorderThickness="0,0,0,1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="25">
                                                                                                            <Border x:Name="IconInnerBorder" BorderBrush="White" BorderThickness="1,1,0,1" Background="#FFE4E4E4">
                                                                                                                <Path x:Name="ExpanderButton" Data="M0,0L1,0 2,0 2,0.99999991 3,0.99999991 3,2 4,2 4,0.99999991 5,0.99999991 5,0 5.9999999,0 7,0 7,0.99999991 5.9999999,0.99999991 5.9999999,2 5,2 5,3 4,3 4,4 3,4 3,3 2,3 2,2 1,2 1,0.99999991 0,0.99999991z" Fill="Black" HorizontalAlignment="Center" Height="5" RenderTransformOrigin="0.5,0.5" SnapsToDevicePixels="True" VerticalAlignment="Center" Width="7">
                                                                                                                    <Path.RenderTransform>
                                                                                                                        <RotateTransform/>
                                                                                                                    </Path.RenderTransform>
                                                                                                                </Path>
                                                                                                            </Border>
                                                                                                        </Border>
                                                                                                        <Border BorderBrush="#FF848484" BorderThickness="0,0,0,1" Grid.ColumnSpan="2" Grid.Column="1">
                                                                                                            <Border BorderBrush="White" BorderThickness="0,1,1,1" Background="#FFE4E4E4">
                                                                                                                <ContentPresenter x:Name="PART_ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                                                                                            </Border>
                                                                                                        </Border>
                                                                                                    </Grid>
                                                                                                    <ControlTemplate.Triggers>
                                                                                                        <Trigger Property="IsChecked" Value="True">
                                                                                                            <Trigger.EnterActions>
                                                                                                                <BeginStoryboard>
                                                                                                                    <Storyboard>
                                                                                                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" Storyboard.TargetName="ExpanderButton">
                                                                                                                            <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="180"/>
                                                                                                                        </DoubleAnimationUsingKeyFrames>
                                                                                                                    </Storyboard>
                                                                                                                </BeginStoryboard>
                                                                                                            </Trigger.EnterActions>
                                                                                                            <Trigger.ExitActions>
                                                                                                                <BeginStoryboard>
                                                                                                                    <Storyboard>
                                                                                                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" Storyboard.TargetName="ExpanderButton">
                                                                                                                            <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                                                                                                        </DoubleAnimationUsingKeyFrames>
                                                                                                                    </Storyboard>
                                                                                                                </BeginStoryboard>
                                                                                                            </Trigger.ExitActions>
                                                                                                            <Setter Property="BorderThickness" TargetName="IconOuterBorder" Value="0"/>
                                                                                                            <Setter Property="BorderThickness" TargetName="IconInnerBorder" Value="1,1,0,0"/>
                                                                                                        </Trigger>
                                                                                                    </ControlTemplate.Triggers>
                                                                                                </ControlTemplate>
                                                                                            </Setter.Value>
                                                                                        </Setter>
                                                                                    </Style>
                                                                                </telerik:RadToggleButton.Style>
                                                                            </telerik:RadToggleButton>
                                                                            <ContentPresenter x:Name="PART_ContentPresenter" Content="{Binding Items}" Grid.Row="1">
                                                                                <ContentPresenter.ContentTemplate>
                                                                                    <DataTemplate>
                                                                                        <ItemsControl>
                                                                                            <ItemsControl.ItemTemplate>
                                                                                                <DataTemplate>
                                                                                                    <telerik:PropertyGridField Content="{Binding}">
                                                                                                        <telerik:PropertyGridField.Resources>
                                                                                                            <Style x:Key="RadComboBox" TargetType="{x:Type telerik:RadComboBox}">
                                                                                                                <Setter Property="ItemContainerStyle">
                                                                                                                    <Setter.Value>
                                                                                                                        <Style TargetType="{x:Type telerik:RadComboBoxItem}">
                                                                                                                            <Setter Property="telerik:StyleManager.Theme">
                                                                                                                                <Setter.Value>
                                                                                                                                    <telerik:Office_BlackTheme/>
                                                                                                                                </Setter.Value>
                                                                                                                            </Setter>
                                                                                                                        </Style>
                                                                                                                    </Setter.Value>
                                                                                                                </Setter>
                                                                                                                <Setter Property="IsEditable" Value="True"/>
                                                                                                                <Setter Property="telerik:StyleManager.Theme">
                                                                                                                    <Setter.Value>
                                                                                                                        <telerik:Office_BlackTheme/>
                                                                                                                    </Setter.Value>
                                                                                                                </Setter>
                                                                                                            </Style>
                                                                                                            <Style x:Key="TextBox" TargetType="{x:Type TextBox}">
                                                                                                                <Setter Property="Padding" Value="3,2,0,2"/>
                                                                                                                <Setter Property="Background" Value="Transparent"/>
                                                                                                                <Setter Property="BorderBrush" Value="Transparent"/>
                                                                                                                <Setter Property="telerik:StyleManager.Theme">
                                                                                                                    <Setter.Value>
                                                                                                                        <telerik:Office_BlackTheme/>
                                                                                                                    </Setter.Value>
                                                                                                                </Setter>
                                                                                                            </Style>
                                                                                                            <Style x:Key="CheckBox" TargetType="{x:Type CheckBox}">
                                                                                                                <Setter Property="Margin" Value="3,2,0,2"/>
                                                                                                                <Setter Property="telerik:StyleManager.Theme">
                                                                                                                    <Setter.Value>
                                                                                                                        <telerik:Office_BlackTheme/>
                                                                                                                    </Setter.Value>
                                                                                                                </Setter>
                                                                                                            </Style>
                                                                                                        </telerik:PropertyGridField.Resources>
                                                                                                        <telerik:StyleManager.Theme>
                                                                                                            <telerik:Office_BlackTheme/>
                                                                                                        </telerik:StyleManager.Theme>
                                                                                                    </telerik:PropertyGridField>
                                                                                                </DataTemplate>
                                                                                            </ItemsControl.ItemTemplate>
                                                                                            <ItemsControl.Style>
                                                                                                <Style TargetType="{x:Type ItemsControl}">
                                                                                                    <Setter Property="BorderBrush" Value="#FF848484"/>
                                                                                                    <Setter Property="BorderThickness" Value="0,0,0,1"/>
                                                                                                    <Setter Property="Template">
                                                                                                        <Setter.Value>
                                                                                                            <ControlTemplate TargetType="{x:Type ItemsControl}">
                                                                                                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" VerticalAlignment="Top">
                                                                                                                    <ItemsPresenter/>
                                                                                                                </Border>
                                                                                                            </ControlTemplate>
                                                                                                        </Setter.Value>
                                                                                                    </Setter>
                                                                                                </Style>
                                                                                            </ItemsControl.Style>
                                                                                        </ItemsControl>
                                                                                    </DataTemplate>
                                                                                </ContentPresenter.ContentTemplate>
                                                                                <ContentPresenter.Visibility>
                                                                                    <Binding ElementName="expandCollapseButton" Path="IsChecked">
                                                                                        <Binding.Converter>
                                                                                            <telerik:BooleanToVisibilityConverter/>
                                                                                        </Binding.Converter>
                                                                                    </Binding>
                                                                                </ContentPresenter.Visibility>
                                                                            </ContentPresenter>
                                                                        </Grid>
                                                                    </Border>
                                                                </DataTemplate>
                                                            </ItemsControl.ItemTemplate>
                                                        </ItemsControl>
                                                    </DataTemplate>
                                                </telerik:ItemTemplateConverter.GroupTemplate>
                                            </telerik:ItemTemplateConverter>
                                        </Binding.Converter>
                                    </Binding>
                                </telerik:PropertyGridPresenter.ContentTemplate>
                                <telerik:StyleManager.Theme>
                                    <telerik:Office_BlackTheme/>
                                </telerik:StyleManager.Theme>
                            </telerik:PropertyGridPresenter>
                        </ScrollViewer>
                    </Border>
                    <Border x:Name="PART_DescriptionPanel" BorderBrush="White" BorderThickness="0,1,0,0" Background="#FFBFBFBF" MinHeight="75" Grid.Row="2" Visibility="{TemplateBinding DescriptionPanelVisibility}">
                        <StackPanel Orientation="Vertical">
                            <TextBlock FontWeight="Bold" Margin="5" Text="{Binding SelectedPropertyDefinition.DisplayName, ElementName=PropertyGridPresenter}"/>
                            <TextBlock Margin="5" TextWrapping="Wrap" Text="{Binding SelectedPropertyDefinition.Description, ElementName=PropertyGridPresenter}"/>
                        </StackPanel>
                    </Border>
                </Grid>
            </Border>
        </ControlTemplate>

Ivan Ivanov
Telerik team
 answered on 29 Mar 2016
1 answer
135 views
How can we set focus to GridViewDataColumn, using keyboard. For example, I have a column with "Name" as header. I want to set focus to that cell in the selected row using a access key like "Alt + N". Is this possible or is there any alternative method available?
Stefan
Telerik team
 answered on 29 Mar 2016
12 answers
704 views
Hello,

I have a problems when i try to display certain PDF files in my company. All I get is a blank page.

Those pdf files come mostly from a XEROX Printer.

Please see the attached file and try it out. Note that the file is a PDF Document, the File Extension .png is just a workaround the allowed extensions. You need to remove ".png" after downloading the file.

I tried it with the current WPF Q3 2014 release from October 27, 2014.

Kindly Regards

Joel

Johan
Top achievements
Rank 1
 answered on 29 Mar 2016
1 answer
106 views

Hi,

 

I have code in this format:

                LocalDataSourceProvider1.RowGroupDescriptions.Add(GetGroupDescription("ABC"));
                LocalDataSourceProvider1.RowGroupDescriptions.Add(GetGroupDescription("DEF"));
                LocalDataSourceProvider1.RowGroupDescriptions.Add(GetGroupDescription("XYZ"));

Now I have to add a Row, which is invisible to the user (I have to send that as an argument to a converter later).

 

 

Thanks in advance,

Srinivas M.

 

Kalin
Telerik team
 answered on 29 Mar 2016
9 answers
257 views

Good morning Telerik,

I am looking for advice on how to accomplish something.

I am working on an app that will allow separated parents to easily plot out who has their children and when.  I am wanting to use Telerik's controls to visually display display something that looks like a combination between a Gannt view and a calendar.  Do you have any suggestions on how I might go about that?

The Mockup shows something kind of like what I'd like to accomplish.

Yana
Telerik team
 answered on 29 Mar 2016
6 answers
196 views

Hi,

 

I'm currently evaluating the RadFluidContentControl for our application, but have run into two issues. Basically, I just want to switch between the states as soon as the LargeContent is too large for the rendered area. The documentation says this is done automatically ("Alternatively, the control will hide the large content (and show the normal content) as soon as the available size is not enough to properly render the large content."). In my example, this doesn't really work. The normal content is only displayed if the large content is halfway clipped (via resizing the window with the mouse). The second issue is that the content is stretched to the full height of the window, although I would expect to just limit it to its minimum size if I set the Height to "Auto".

 

Here's my code:

 

<telerik:RadFluidContentControl Height="Auto">          
 
            <telerik:RadFluidContentControl.Content>
 
            <StackPanel Orientation="Vertical" Background="DeepSkyBlue">
                <Grid Margin="0,0,0,5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <DatePicker/>
                    <TextBlock
                    Grid.Column="1"
                    Margin="9,0"
                    VerticalAlignment="Center"
                    Text="until" />
                </Grid>
                <DatePicker />
            </StackPanel>
 
        </telerik:RadFluidContentControl.Content>
 
            <telerik:RadFluidContentControl.LargeContent>
            <StackPanel Margin="0,0,0,2" Orientation="Horizontal" Background="GreenYellow">
                <DatePicker Margin="3" />
                <TextBlock
                Margin="3"
                VerticalAlignment="Center"
                Text="until" />
                <DatePicker Margin="3" />
            </StackPanel>
        </telerik:RadFluidContentControl.LargeContent>
             
             
</telerik:RadFluidContentControl>

 

What am I doing wrong?

Lennart
Top achievements
Rank 1
 answered on 29 Mar 2016
2 answers
173 views

Hello,

I need to add connection points to a certain connection and i need to do it with a single click and without the 'ctrl' key pressed. I've tried the AddConnectionPoint method but is not giving us the expected behavior  (apparently the points need to be added in some specific order). This is my code:

1.void Connection_MouseDown(object sender, MouseButtonEventArgs e)
2.{
3.     RadDiagramConnection Connection = sender as RadDiagramConnection;
4.
5.     var transformedPoint = this.diagram.GetTransformedPoint(Mouse.GetPosition(this.diagram));
6.
7.     Connection.AddConnectionPoint(e.MouseDevice.GetPosition(this.diagram));         
8.}

I've tried this aswell:

01.void Connection_MouseDown(object sender, MouseButtonEventArgs e)
02.{
03.       RadDiagramConnection Connection = sender as RadDiagramConnection;
04. 
05.       var transformedPoint = this.diagram.GetTransformedPoint(Mouse.GetPosition(this.diagram));
06.       Connection.AddConnectionPoint(e.MouseDevice.GetPosition(this.diagram));
07. 
08.       IList<Point> connPoints = Connection.ConnectionPoints.OrderBy(c => c.X).OrderBy(c => c.Y).ToList();
09.                 
10.       Connection.ConnectionPoints.Clear();
11.       foreach (Point point in connPoints)
12.       {
13.           Connection.AddConnectionPoint(point);
14.       }   
15.}

When i start to make points with one single click, this happens (Attached image).  

We need to add connection points the same way we do with they ctrl key pressed. But without the 'ctrl' key pressed.

Thank you

 

 

Diego
Top achievements
Rank 1
 answered on 28 Mar 2016
4 answers
161 views

Hi,

I am trying to show a RadColumnSparkline within a TimeBar, but I haven't been able to achieve this.

I want to show some data per day like in the column visualization example, this is some sample code like the one that I am using:

public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            
            DateTime today = DateTime.Today;
            List<MyCost> data = new List<MyCost>()
            {
                new MyCost() { Cost = 1,  MyDate=today },
                new MyCost() { Cost = 2,  MyDate= today.AddDays(1)},
                new MyCost() { Cost = 3, MyDate=today.AddDays(2) },
                new MyCost() { Cost = 4, MyDate=today.AddDays(3)},
                new MyCost() { Cost = 5, MyDate=today.AddDays(4)},
            };
            this.DataContext = data;
        }
    }
 
    public class MyCost
    {
        public double Cost { get; set; }
        public DateTime MyDate { get; set; }
    }

<telerik:RadColumnSparkline x:Name="PART_SparkbarControl" HorizontalAlignment="Left" VerticalAlignment="Top" Height="48" Width="400"
        telerik:StyleManager.Theme="Office_Blue"
        ItemsSource="{Binding}"
        XValuePath="MyDate"
        YValuePath="Cost" />

Lets say that the first date is 03/17/2016, so I want to show data from 03/17 to 03/21 with the values 1 to 5, I'd expect to see something like the first image but instead I get the bars like in the second image.

The data is not being shown in the desired date.

I am not sure if I am missing some configuration or what I am soing wrong.

 

Amige
Top achievements
Rank 1
Veteran
 answered on 28 Mar 2016
6 answers
161 views

We have a RadMap that uses the Bing provider.  We want to allow our users to be able to toggle the map background on and off.  How can we do this?
We have a toggle button for that, here is the (non-working) code:

private void ToggleMapBtn_Click(object sender, System.Windows.RoutedEventArgs e)
{
    this.CustomerMap.Providers.Clear();
    if (this.ToggleMapBtn.IsChecked == true)
    {
        this.CustomerMap.Provider = this.bingProvider;
    }
    else
    {
        this.CustomerMap.Provider = this.emptyProvider;
    }
    this.CustomerDataLayer.Refresh();
}
Thank You.
Petar Mladenov
Telerik team
 answered on 28 Mar 2016
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?