Telerik Forums
UI for WPF Forum
1 answer
228 views

I ran the demo called Resize Map Shapes with Mouse Dragging (https://docs.telerik.com/devtools/wpf/controls/radmap/how-to/howto-resize-map-shapes-with-mouse-dragging)

which I downloaded from the associated web page (https://www.telerik.com/blogs/radmap-for-silverlight-wpf-how-to-resize-map-shapes-with-mouse-dragging)

and it worked fine.

I updated the controls to WPF40 version 2018.3.1016.40 and it it now acts differently.  When dragging, it loses mouse capture.  If I release the left mouse button and move the cursor back over the draggable circle it then continues to drag (won't do anything if I don't release the left mouse button).

I also tried this using WPF45 version 2018.3.1016.45 and the same problem (and changing my app's .Net version to 4.6.1).

Attached are two animated gifs showing the original version working and the replaced dll version's odd behavior.

I tracked GotMouseCapture, IsMouseCaptureChanged and LostMouseCapture and recorded this:

12:39.122 IsMouseCaptureChanged
12:39.122 GotMouseCapture
12:39.122 IsMouseCaptureChanged
12:39.122 LostMouseCapture

I didn't change the MainWindow.xaml.cs at all.  I just removed the references to the 3 Telerik controls, removed the controls from the binaries folder, added the newer Telerik controls to the binaries folder, and added the references back.  I'm using Visual Studio 2017.

Petar Mladenov
Telerik team
 answered on 03 Jul 2019
4 answers
400 views

Below is my radcombobox with checkbox multi select dropdown. 

 

<telerik:RadComboBox x:Name="StatusFilter"
                                 Width="150"
                                 Margin="10,1,10,2"
                                 HorizontalAlignment="Stretch"
                                 HorizontalContentAlignment="Left"
                                 CanAutocompleteSelectItems="True"
                                 EmptySelectionBoxTemplate="{StaticResource EmptyTemplate}"
                                 EmptyText="Status"
                                 IsEditable="False"
                                 ItemsSource="{Binding StatusesComboBox}"
                                 SelectedValue="{Binding CourseStatusId, Mode=TwoWay}"
                                 SelectedValuePath="Id">
                <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                        <CheckBox Height="16"
                                  Margin="0"
                                  HorizontalAlignment="Stretch"
                                  VerticalAlignment="Stretch"
                                  Content="{Binding Value.DisplayName}"
                                  IsChecked="{Binding IsSelected}" />
                    </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
                <telerik:RadComboBox.SelectionBoxTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding ItemsSource.SelectedItemsText, ElementName=StatusFilter, Mode=OneWay}" />
                    </DataTemplate>
                </telerik:RadComboBox.SelectionBoxTemplate>
            </telerik:RadComboBox>

 

 

The issue is the empty text doesn't show. It's just blank. Is there anyway to get this to show? I suspect it has to do with the custom data templates. Can anyone help me with this?

Thanks.

Keenan
Top achievements
Rank 1
 answered on 02 Jul 2019
1 answer
267 views

I have a gridview with another gridview embedding in the detail.

When a row is opened and the detail is displayed the grid shows fine.

When the horizonal scroll bar is used the detail grid will disappear regardless to how many columns are still needed to display in the detail.

Please see bellow gridviews and screenshots attached

<telerik:RadGridView Grid.Column="0" CanUserSelect="False"
                                     Visibility="{Binding ShowMSD,Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                      IsBusy="{Binding Source={StaticResource Locator},Path=BrowsePackagePageViewmodel.IsBusy}"
                                     FilterOperatorsLoading="OnFilterOperatorsLoading"
                                     IsTabStop="False" AutoGenerateColumns="False" AlternateRowBackground="Gainsboro"
                                     AlternationCount="2" RowDetailsTemplate="{StaticResource BrowseDetailTemplate}"
                                     ShowColumnFooters="False"  FontSize="16" GridLinesVisibility="Both" ShowColumnHeaders="True"
                                     ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" IsReadOnly="True" Margin="0,8"
                                     ItemsSource="{Binding FilteredXrefStockLevels}"
                                     FrozenColumnsSplitterVisibility="Collapsed" EnableRowVirtualization="True" EnableColumnVirtualization="True"
                                     IsFilteringAllowed="True" x:Name="GridViewItems"
                                     CanUserSortColumns="True" >
 
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="RowDetailsVisibilityChanged">
                            <command:EventToCommand PassEventArgsToCommand="True"
                                  Command="{Binding LoadAllStockCommand, Mode=OneWay}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
 
 
                    <telerik:RadGridView.Columns>
 
                        <telerik:GridViewDataColumn IsFilterable="False" IsSortable="False" MinWidth="0" HeaderTextAlignment="Center" >
                            <telerik:GridViewDataColumn.Header >
                                <TextBlock Text="" Margin="0" Padding="0" />
                            </telerik:GridViewDataColumn.Header>
                            <telerik:GridViewDataColumn.CellTemplate>
                                <DataTemplate >
                                    <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Width="Auto" >
                                        <CheckBox d:DataContext="{d:DesignInstance vm:ItemManfXrefStockLevel}"
                                                  telerik:TouchManager.TouchMode="None"
                                                IsChecked="{Binding IsSelected,Mode=TwoWay}"
                                                  HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                                >
 
                                            <!--<CheckBox.LayoutTransform>
                                                <ScaleTransform ScaleX="2" ScaleY="2" />
                                            </CheckBox.LayoutTransform>-->
                                        </CheckBox>
                                    </Grid>
                                </DataTemplate>
                            </telerik:GridViewDataColumn.CellTemplate>
                        </telerik:GridViewDataColumn>
 
                        <ctrls:InoToggleColumn DataMemberBinding="{Binding DetailExpanded}" />
 
 
                        <!-- Part Number -->
                        <telerik:GridViewDataColumn Width="Auto" ShowDistinctFilters="False" x:Name="ColPartNumber"
                            DataMemberBinding="{Binding Z_No}">
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Orientation="Vertical" Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.PartNumberColName1}" />
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.PartNumberColName2}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
                         
 
                        <!-- Description -->
                        <telerik:GridViewDataColumn Width="*" MinWidth="300" ShowDistinctFilters="False" x:Name="ColDesc"
                            DataMemberBinding="{Binding Desc}"  >
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.DescriptionColName}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
 
                        <!-- Name Manf -->
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding NameManf}" UniqueName="NameManf" ShowDistinctFilters="False" IsVisible="{Binding Source={StaticResource Locator},Path=SettingsService.IsMasterManfManfNo}" >
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Orientation="Vertical" Margin="8">
                                    <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.NameManfFieldName}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
 
 
                        <!-- Manfno -->
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ManfNo}" UniqueName="ManfNo" ShowDistinctFilters="False" IsVisible="{Binding Source={StaticResource Locator},Path=SettingsService.IsMasterManfManfNo}" >
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Orientation="Vertical" Margin="8">
                                    <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ManfNoFieldName}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
 
 
                            <!-- package count -->
                        <telerik:GridViewDataColumn Width="Auto" ShowDistinctFilters="False" x:Name="ColPackages" TextAlignment="Right"
                            DataMemberBinding="{Binding PackageCount}"  >
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.PackageCountColName1}" />
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.PackageCountColName2}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
 
                        <!-- Quantity -->
                        <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False" x:Name="ColQtyOnHand"
                            DataMemberBinding="{Binding QtyOnHand}"  >
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.QtyOnHandColName1}" />
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.QtyOnHandColName2}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
 
                        <!-- Quantity -->
                        <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False"
                            DataMemberBinding="{Binding VItemManfXrefStockLevel.ScrapPerInsertQty}" DataFormatString="{}{0:n0}"  >
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ScrapPerInsertQtyColName1}" />
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ScrapPerInsertQtyColName2}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
 
                        <!-- Quantity -->
                        <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False" DataFormatString="{}{0:P2}"
                            DataMemberBinding="{Binding VItemManfXrefStockLevel.ScrapPerKitPercent}"  >
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ScrapPerKitPercentColName1}" />
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ScrapPerKitPercentColName2}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
 
                        <!-- Quantity -->
                        <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False"
                            DataMemberBinding="{Binding VItemManfXrefStockLevel.MinLevel}"  >
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.MinLevelColName1}" />
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.MinLevelColName2}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
 
                        <!-- Quantity -->
                        <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False"
                            DataMemberBinding="{Binding VItemManfXrefStockLevel.MaxLevel}"  >
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.MaxLevelColName1}" />
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.MaxLevelColName2}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
                         
                        <!-- Quantity -->
                        <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False"
                            DataMemberBinding="{Binding VItemManfXrefStockLevel.MinPkgLevel}"  >
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.MinPkgColName1}" />
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.MinPkgColName2}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
 
                        <!-- Quantity -->
                        <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False"
                            DataMemberBinding="{Binding VItemManfXrefStockLevel.ReturnNotRequired}"  >
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ReturnNotRequiredColName1}" />
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ReturnNotRequiredColName2}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
 
                        <!-- Quantity -->
                        <telerik:GridViewDataColumn Width="Auto" TextAlignment="Left" ShowDistinctFilters="True"  ShowFieldFilters="False"
                            DataMemberBinding="{Binding VItemManfXrefStockLevel.packName}"  >
                            <telerik:GridViewDataColumn.Header>
                                <StackPanel Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.PackageTypeColName1}" />
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.PackageTypeColName2}" />
                                </StackPanel>
                            </telerik:GridViewDataColumn.Header>
                        </telerik:GridViewDataColumn>
 
 
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
<DataTemplate x:Key="BrowseDetailTemplate">
                <StackPanel d:DataContext="{d:DesignInstance Type=browse:ItemManfXrefStockLevel}">
                    <telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding AllStockViewModels}" SelectedItem="{Binding Source={StaticResource Locator},Path=BrowsePackagePageViewmodel.AllStockViewModel}" FilterOperatorsLoading="Detail_OnFilterOperatorsLoading"
                                         FrozenColumnsSplitterVisibility="Collapsed" IsFilteringAllowed="True" CanUserSortColumns="True" SelectionMode="Single"
                                         ShowColumnFooters="False"  FontSize="16" GridLinesVisibility="Both" ShowColumnHeaders="True" ShowGroupPanel="False"
                                         RowIndicatorVisibility="Collapsed" IsReadOnly="True" Margin="60,20" x:Name="DetailGrid" EnableRowVirtualization="True" EnableColumnVirtualization="True"
                                         >
                        <telerik:RadContextMenu.ContextMenu >
                            <telerik:RadContextMenu Opened="RadContextMenu_OnOpened">
                                    <telerik:RadMenuItem Header="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ChangeQuantityMenuText}"
                                                         Command="{Binding Source={StaticResource Locator},Path=BrowsePackagePageViewmodel.ChangeOnHandQtyCommand}" />
                            </telerik:RadContextMenu>
                        </telerik:RadContextMenu.ContextMenu>
                         
                        <telerik:RadGridView.Columns>
 
                            <telerik:GridViewDataColumn IsFilterable="False" IsSortable="False" MinWidth="0" HeaderTextAlignment="Center" >
                                <telerik:GridViewDataColumn.Header >
                                    <TextBlock Text="" Margin="0" Padding="0" />
                                </telerik:GridViewDataColumn.Header>
                                <telerik:GridViewDataColumn.CellTemplate>
                                    <DataTemplate >
                                        <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Width="Auto" >
                                            <CheckBox d:DataContext="{d:DesignInstance viewModel:AllStockViewModel}"
                                                      telerik:TouchManager.TouchMode="None"
                                                 IsEnabled="{Binding IsAvailable}"
                                                IsChecked="{Binding IsSelected,Mode=TwoWay}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                                >
 
                                                <!--<CheckBox.LayoutTransform>
                                                    <ScaleTransform ScaleX="2" ScaleY="2" />
                                                </CheckBox.LayoutTransform>-->
                                            </CheckBox>
                                        </Grid>
                                    </DataTemplate>
                                </telerik:GridViewDataColumn.CellTemplate>
                            </telerik:GridViewDataColumn>
 
                                <!-- UID -->
                            <telerik:GridViewDataColumn Width="Auto" ShowDistinctFilters="False" x:Name="colUid" IsVisible="{Binding BrowsePackagePageViewmodel.ShowUID,Source={StaticResource Locator}}"
                                                        DataMemberBinding="{Binding UID}">
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Orientation="Vertical" Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.UIDDetailColName1}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
 
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding ParentNameLoc}" UniqueName="ParentNameLoc" ShowDistinctFilters="False" >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Orientation="Vertical" Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.BinDetailColName}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
 
                            <telerik:GridViewDataColumn Width="200"
                            DataMemberBinding="{Binding QtyOnHand}" TextAlignment="Right" UniqueName="QtyOnHand" ShowDistinctFilters="False" >
 
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Orientation="Vertical" Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.QtyOnHandDetailColName1}" />
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.QtyOnHandDetailColName2}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
 
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding FifoDate}" DataFormatString="{}{0:d}" UniqueName="FifoDate" ShowDistinctFilters="False"  >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel>
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.FifoDateDetailColName1}" />
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.FifoDateDetailColName2}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
 
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding DateCode}"  >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel>
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.DateCodeDetailColName1}" />
                                            <!--<TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.DateCodeDetailColName2}" />-->
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
 
                            <!-- Extra0 -->
                            <telerik:GridViewDataColumn Width="Auto" ShowDistinctFilters="False" x:Name="colExtra0" IsVisible="{Binding BrowsePackagePageViewmodel.ShowExtra0,Source={StaticResource Locator}}"
                            DataMemberBinding="{Binding VBinMasterAllStock.Extra0}">
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Orientation="Vertical" Margin="8">
                                        <TextBlock Text="{Binding BrowsePackagePageViewmodel.NameExtra0,Source={StaticResource Locator}}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
 
                                <!-- Extra1 -->
                                <telerik:GridViewDataColumn Width="Auto" ShowDistinctFilters="False" x:Name="colExtra1" IsVisible="{Binding BrowsePackagePageViewmodel.ShowExtra1,Source={StaticResource Locator}}"
                            DataMemberBinding="{Binding VBinMasterAllStock.Extra1}">
                                    <telerik:GridViewDataColumn.Header>
                                        <StackPanel Orientation="Vertical" Margin="8">
                                            <TextBlock Text="{Binding BrowsePackagePageViewmodel.NameExtra1,Source={StaticResource Locator}}" />
                                        </StackPanel>
                                    </telerik:GridViewDataColumn.Header>
                                </telerik:GridViewDataColumn>
 
                                <!-- Extra2 -->
                                <telerik:GridViewDataColumn Width="Auto" ShowDistinctFilters="False" x:Name="colExtra2" IsVisible="{Binding BrowsePackagePageViewmodel.ShowExtra2,Source={StaticResource Locator}}"
                            DataMemberBinding="{Binding VBinMasterAllStock.Extra2}">
                                    <telerik:GridViewDataColumn.Header>
                                        <StackPanel Orientation="Vertical" Margin="8">
                                            <TextBlock Text="{Binding BrowsePackagePageViewmodel.NameExtra2,Source={StaticResource Locator}}" />
                                        </StackPanel>
                                    </telerik:GridViewDataColumn.Header>
                                </telerik:GridViewDataColumn>
 
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding SortKey0}" IsVisible="{Binding Source={StaticResource Locator},Path=BrowsePackagePageViewmodel.IsRemoveDebugMode}" />
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding SortKey1}" IsVisible="{Binding Source={StaticResource Locator},Path=BrowsePackagePageViewmodel.IsRemoveDebugMode}" />
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding SortKey2}" IsVisible="{Binding Source={StaticResource Locator},Path=BrowsePackagePageViewmodel.IsRemoveDebugMode}" />
 
                            </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
                </StackPanel>
            </DataTemplate>
Dilyan Traykov
Telerik team
 answered on 02 Jul 2019
1 answer
146 views

Hey,

 

is it possible to change just the font of the grouped rows? The default and cell fonts should not be changed.I want

to change the font to consolas (mono space font).

 

 

Dilyan Traykov
Telerik team
 answered on 01 Jul 2019
7 answers
300 views

Hi,

I need to create new custom indicator for candlestick chart  (VWAP & Pivots). I found explanation here (http://docs.telerik.com/devtools/winforms/chartview/series-types/indicators/custom-indicators), but I can't compile the code. 

 

public class DisparityIndexIndicator: ExponentialMovingAverageIndicator

{

    public override double GetProcessedValue(int currentIndex){

double close = (this.DataPoints[currentIndex] as IndicatorValueDataPoint).BaseValue;double ema = base.GetProcessedValue(currentIndex);double result = ((close - ema) / ema) * 100;return result;}}

Lance | Senior Manager Technical Support
Telerik team
 answered on 28 Jun 2019
1 answer
252 views

Hi,

After 9h 15min of trying to change the color of a f**king selected Tab of a Radpane I finally give up an post this thread.

I have created a copy of RadPane Control and Placed it in a style. Changed and added Values. Commented things out. And allways the same result.

Here is my code:

<Style TargetType="telerik:RadPane" BasedOn="{StaticResource RadPaneStyle}">
                <Setter Property="Background" Value="#121212"/>
                <Setter Property="Foreground" Value="#808080"/>
                <Setter Property="Template">
                    <Setter.Value>
                    <ControlTemplate>
                        <Grid x:Name="wrapper" Margin="0,0,0,-2" Background="Purple">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation To="0.2" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HeaderElement"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                           
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverVisual"/>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="PinnedVisual">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="#202020"/>
                                                   
                                            </ObjectAnimationUsingKeyFrames>
                                            
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Selected">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)"  Storyboard.TargetName="SelectedVisual"/>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="HeaderElement">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="#202020"/>
                                                  
                                                </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="PinnedStates">
                                    <VisualState x:Name="Unpinned">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PinnedVisual"/>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Margin" Storyboard.TargetName="wrapper">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Thickness>1</Thickness>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Margin" Storyboard.TargetName="HeaderElement">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Thickness>0</Thickness>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MouseOverVisual">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pinned"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="PinnedVisual" BorderBrush="Red" Background="Red" BorderThickness="0,0,0,4" Grid.ColumnSpan="2" Opacity="0"/>
                            <Border x:Name="MouseOverVisual"  Background="Red" Grid.ColumnSpan="2" Opacity="0"/>
                            <Border x:Name="SelectedVisual" BorderBrush="Red" BorderThickness="1,0,1,1" Background="Red" Margin="0,-1,0,0" Opacity="0"/>
                            <Primitives:TabItemContentPresenter x:Name="HeaderElement" Background="Red" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" MinHeight="16" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                                <Primitives:TabItemContentPresenter.Style>
                                    <Style TargetType="{x:Type Primitives:TabItemContentPresenter}">
                                            <Setter Property="Background" Value="Blue"/>
                                            <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="{x:Type Primitives:TabItemContentPresenter}">
                                                    <Border BorderBrush="{TemplateBinding BorderBrush}" Background="OrangeRed" BorderThickness="{TemplateBinding BorderThickness}" >
                                                            <ContentPresenter  ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                                    </Border>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                        <Setter Property="IsTabStop" Value="False"/>
                                    </Style>
                                </Primitives:TabItemContentPresenter.Style>
                            </Primitives:TabItemContentPresenter>
                        </Grid>
                    </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

 

Also tried to get some results by creating copy of all other raddocking components.

Why can't there be a simple TabItemHeaderTemplate which can easily be styled?

Btw. I don't want to use any predefined theme.

Regard


Vicky
Telerik team
 answered on 28 Jun 2019
4 answers
482 views
Hi,
I have a RadTabControl with several tab items, and a RadGridView inside each TabItem, with its ItemsSource binded to a specific collection of data.
Of course the data of those RadGridViews is loaded only when the containing tabitem is selected at least once, and the gridview is shown at least once.

My problem is that I need to export the data of all those RadGridViews (using Export() method), whether they have been selected by the user or not.
By now I may export data only of those grid that have been shown at least once, the others don't contain any data.

So the question is:
Is there a way to force a RadGridView to load its data without showing it, (in my case without manually selecting the RadTabItem that contains the grid)?

Thank you very much for your kind attention

Enrico
Chris
Top achievements
Rank 1
 answered on 28 Jun 2019
5 answers
403 views

Currently when you highlight a row in the child GridView, the ParentRow becomes highlighted. It would be really nice to have an option so that the ParentRow would be selected when a row in the child GridView is selected. This should work recursively selecting the ParentRow all the way up the hierarchy.

I've written a workaround, but it isn't pretty.

Please add this functionality. :)

 

My case involves a three tier hierarchical GridView. If I select a row in a third tier GridView, then I want its ParentRow to become selected on the second tier and the second tier's ParentRow to become selected on the first tier. Hopefully that makes sense.

Usman
Top achievements
Rank 1
 answered on 28 Jun 2019
1 answer
428 views

Hello,

Is there a way to only display the TrackBall Info box when the right mouse button is clicked? We have a lot of info on our chart and sometimes the info box obscures the graph underneath.

Thanks.

Martin Ivanov
Telerik team
 answered on 28 Jun 2019
3 answers
175 views
Hi,

 

I tried to open a document using the OpenDocumentCommand but it's not working.

Could you provide me some information how to achieve this?

Btw: SaveCommand opens the SaveFileDialog as expected.

 

best regards

Dietmar

 
<Window
    x:Class="telerikrtbtest.MainWindow"
    xmlns:local="clr-namespace:telerikrtbtest"
    Title="MainWindow"
    Width="525"
    Height="350"
    mc:Ignorable="d">
    <Grid>
        <Grid.Resources />
 
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
 
        <telerik:RadRibbonButton
            x:Name="OpenDocumentButton"
            Margin="0,2,2,2"
            telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding OpenDocumentCommand}"
            Content="open"
            DataContext="{Binding Commands, ElementName=richTextBoxAdv}" />
 
        <telerik:RadRichTextBox x:Name="radRichTextBox" Grid.Row="1" />
 
 
    </Grid>
</Window>
Dietmar
Top achievements
Rank 1
 answered on 27 Jun 2019
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?