Telerik Forums
UI for WPF Forum
4 answers
239 views
Hi, i need show the print preview of one Grid Hierarchy, i find some examples but only show the first level. When HierarchyChildTemplate is open in the grid not show the others levels...

How can show the print preview with HierarchyChildTemplate expanded?...

thanks..

Add picture...
Stefan Nenchev
Telerik team
 answered on 12 Jan 2016
5 answers
324 views
Hello
i have a radlistbox with an item data template, containing, textbox, other controls and an other RadListBox
this second RadListBox also have an itemDataTemplate containing some Textboxs.

The fact is that i want to be able to use tab to switch focus on the differrents textbox inside a radlistBox item.

But each time i have a text box focused and i press "tab". The main RadListBox lost focus.

What should i do to enable tabbing between textBox inside a RadListBox item

here is the code of the radListBox

[code]
<telerik:RadListBox Name="ListBoxDeclinaisons" Background="AntiqueWhite" ItemsSource="{Binding listeDeclinaison}"  >
                                
                                <telerik:RadListBox.ItemTemplate>
                                    <DataTemplate>
                                        <Border BorderBrush="Brown" BorderThickness="1" Margin="5">
                                            <Grid Background="Bisque">
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="40"></RowDefinition>
                                                    <RowDefinition></RowDefinition>
                                                </Grid.RowDefinitions>
                                                <Grid Grid.Row="0">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition></ColumnDefinition>
                                                        <ColumnDefinition Width="50"></ColumnDefinition>
                                                    </Grid.ColumnDefinitions>
                                                    <TextBox Name="TextBoxLibelleDeclinaison" FontSize="16" FontWeight="Bold" Text="{Binding LIBELLE}" Grid.Column="0" Margin="5"></TextBox>
                                                    <telerik:RadButton Visibility="{Binding POSSEDE_DM, Converter={StaticResource booleanToVisibility}}" Name="ButtonDMDeclinaison" Grid.Column="1" Margin="5" Click="ButtonDMDeclinaison_Click" >DM</telerik:RadButton>
                                                    
                                                </Grid>
                                                <Grid Grid.Row="1">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="100"></ColumnDefinition>
                                                        <ColumnDefinition Width="100"></ColumnDefinition>
                                                        <ColumnDefinition Width="100"></ColumnDefinition>
                                                        <ColumnDefinition></ColumnDefinition>
                                                        
                                                    </Grid.ColumnDefinitions>
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="auto"></RowDefinition>
                                                        <RowDefinition Height="auto"></RowDefinition>
                                                        <RowDefinition Height="auto"></RowDefinition>
                                                        <RowDefinition Height="auto"></RowDefinition>
                                                        <RowDefinition Height="auto"></RowDefinition>
                                                        <RowDefinition></RowDefinition>
                                                    </Grid.RowDefinitions>
                                                    <Label Grid.Row="0" Grid.Column="0">ID SDMO</Label>
                                                    <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ID_SDMO}"></TextBox>
                                                    <Label Grid.Row="1" Grid.Column="0">Code Standard</Label>
                                                    <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding CODE_STANDARD}"></TextBox>
                                                    <Label Grid.Row="2" Grid.Column="0">Temps de Montage</Label>
                                                    <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding TEMPSMONTAGE}"></TextBox>
                                                    <Label Grid.Row="3" Grid.Column="0">Prix TI</Label>
                                                    <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding PRIXTI}"></TextBox>
                                                    <Label Grid.Row="4" Grid.Column="0">Jetons</Label>
                                                    <TextBox Grid.Row="4" Grid.Column="1" Text="{Binding QUANTITE_JETON}"></TextBox>
                                                    <Label Grid.Row="0" Grid.Column="2"><Hyperlink IsEnabled="{Binding IsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type FrameworkElement}}}"  Click="ButtonAvertissementDeclinaison_Click_1">Avertissement</Hyperlink></Label>
                                                    <!--<telerik:RadButton Name="ButtonAvertissementDeclinaison" Click="ButtonAvertissementDeclinaison_Click_1" Grid.Row="1" Grid.Column="3">Modifier</telerik:RadButton>-->
                                                    <Label Grid.Row="1" Grid.Column="2">
                                                        <Hyperlink IsEnabled="{Binding IsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type FrameworkElement}}}"  Click="ButtonCommentaireDeclinaison_Click_1" >Commentaire</Hyperlink>
                                                    </Label>
                                                    <!--<telerik:RadButton Name="ButtonCommentaireDeclinaison" Click="ButtonCommentaireDeclinaison_Click_1"  Grid.Row="2" Grid.Column="3">Modifier</telerik:RadButton>-->
                                                    <Label Grid.Row="2" Grid.Column="2">
                                                        <Hyperlink IsEnabled="{Binding IsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type FrameworkElement}}}" Click="ButtonAideDeclinaison_Click_1" >Aide</Hyperlink>
                                                    </Label>
                                                    <Label Grid.Row="3" Grid.Column="2">
                                                        <Hyperlink Name="HyperlinkApplicabiliteGE" IsEnabled="{Binding IsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type FrameworkElement}}}" Click="HyperlinkApplicabiliteGE_Click" >Applicabilité</Hyperlink>
                                                    </Label>
                                                    <!--<telerik:RadButton Name="ButtonAideDeclinaison" Click="ButtonAideDeclinaison_Click_1" Grid.Row="3" Grid.Column="3">Modifier</telerik:RadButton>-->
                                                    <telerik:RadListBox Grid.Column="3" Grid.Row="0" Grid.RowSpan="6" ItemsSource="{Binding listeConstituants_Prix}" Margin="5,0,0,0">
                                                        <telerik:RadListBox.ItemTemplateSelector>
                                                            <telerik:ConditionalDataTemplateSelector>
                                                                <telerik:DataTemplateRule Condition="CONSTITUANT.QUANTIFIABLE">
                                                                    <DataTemplate >
                                                                        <Grid >
                                                                            <Grid.ColumnDefinitions>
                                                                                <ColumnDefinition></ColumnDefinition>
                                                                                <ColumnDefinition></ColumnDefinition>
                                                                                <ColumnDefinition></ColumnDefinition>
                                                                                <ColumnDefinition></ColumnDefinition>
                                                                            </Grid.ColumnDefinitions>
                                                                            <Label Grid.Column="0">
                                                                                <Hyperlink Name="HyperlinkConstituant" Click="HyperlinkConstituant_Click" IsEnabled="{Binding IsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type FrameworkElement}}}">
                                                                                    <TextBlock Text="{Binding CONSTITUANT.LIBELLE}"></TextBlock>
                                                                                </Hyperlink>
                                                                            </Label>
                                                                            <!--<Label Grid.Column="0" Content="{Binding CONSTITUANT.LIBELLE}"></Label>-->
                                                                            <TextBox KeyboardNavigation.TabIndex="0" Name="TextBoxCoutUnitConstitDecli" Grid.Column="1" Text="{Binding COUTUNIT, UpdateSourceTrigger=PropertyChanged}"  
                                                                             LostKeyboardFocus="TextBoxCoutUnitConstitDecli_LostKeyboardFocus_1" PreviewTextInput="TextBoxCoutUnitConstitDecli_PreviewTextInput_1"  ></TextBox>
                                                                            <TextBox KeyboardNavigation.TabIndex="1" Grid.Column="2" Name="textBoxQuantiteConstit" Text="{Binding QUANTITE,UpdateSourceTrigger=PropertyChanged }"
                                                                                     PreviewTextInput="textBoxQuantiteConstit_PreviewTextInput_1" LostKeyboardFocus="TextBoxCoutUnitConstitDecli_LostKeyboardFocus_1" ></TextBox>
                                                                            <Label Grid.Column="3" Content="{Binding CONSTITUANT.UNITE}"></Label>
                                                                        </Grid>
                                                                    </DataTemplate>
                                                                </telerik:DataTemplateRule>
                                                                <telerik:DataTemplateRule Condition="CONSTITUANT.QUANTIFIABLE=false">
                                                                    <DataTemplate>
                                                                        <Grid>
                                                                            <Grid.ColumnDefinitions>
                                                                                <ColumnDefinition></ColumnDefinition>
                                                                                <ColumnDefinition></ColumnDefinition>
                                                                                <ColumnDefinition></ColumnDefinition>
                                                                                <ColumnDefinition></ColumnDefinition>
                                                                            </Grid.ColumnDefinitions>
                                                                            <Label Grid.Column="0" Content="{Binding CONSTITUANT.LIBELLE}"></Label>
                                                                            <TextBox KeyboardNavigation.TabIndex="0" Name="TextBoxCoutUnitConstitDecli" Grid.Column="1" Text="{Binding COUTUNIT, UpdateSourceTrigger=PropertyChanged}"  
                                                                             LostKeyboardFocus="TextBoxCoutUnitConstitDecli_LostKeyboardFocus_1" PreviewTextInput="TextBoxCoutUnitConstitDecli_PreviewTextInput_1"  ></TextBox>
                                                                        </Grid>
                                                                    </DataTemplate>
                                                                </telerik:DataTemplateRule>
                                                            </telerik:ConditionalDataTemplateSelector>
                                                        </telerik:RadListBox.ItemTemplateSelector>
                                                        <!--<telerik:RadListBox.ItemTemplate>
                                                            <DataTemplate>
                                                                <Grid>
                                                                    <Grid.ColumnDefinitions>
                                                                        <ColumnDefinition></ColumnDefinition>
                                                                        <ColumnDefinition></ColumnDefinition>
                                                                        <ColumnDefinition></ColumnDefinition>
                                                                        <ColumnDefinition></ColumnDefinition>
                                                                    </Grid.ColumnDefinitions>
                                                                    <Label Grid.Column="0" Content="{Binding CONSTITUANT.LIBELLE}"></Label>
                                                                    <TextBox Name="TextBoxCoutUnitConstitDecli" Grid.Column="1" Text="{Binding COUTUNIT, UpdateSourceTrigger=PropertyChanged}"  
                                                                             LostKeyboardFocus="TextBoxCoutUnitConstitDecli_LostKeyboardFocus_1" PreviewTextInput="TextBoxCoutUnitConstitDecli_PreviewTextInput_1"  ></TextBox>
                                                                    <TextBox Grid.Column="2" Name="textBoxQuantiteConstit" Text="{Binding QUANTITE}" PreviewTextInput="textBoxQuantiteConstit_PreviewTextInput_1"></TextBox>
                                                                    <Label Grid.Column="3" Content="{Binding CONSTITUANT.UNITE}"></Label>
                                                                </Grid>
                                                            </DataTemplate>
                                                        </telerik:RadListBox.ItemTemplate>-->
                                                    </telerik:RadListBox>
                                                </Grid>
                                            </Grid>
                                        </Border>
                                    </DataTemplate>
                                </telerik:RadListBox.ItemTemplate>
                                
                            </telerik:RadListBox>
[/code]
Nicolas
Top achievements
Rank 1
 answered on 12 Jan 2016
4 answers
249 views

Hello,

I am using a tile view and within the tiles there is scrollable content. How can I make it that the scroll for the tile view is not active when the mouse is over the scrollable content in the tile?  Thanks!

Adam
Top achievements
Rank 1
 answered on 12 Jan 2016
2 answers
281 views

Hello

I trying to bind the value of the filter to property in VM

 

This not working

 

<rad:RadGridView.FilterDescriptors>

    <rad:CompositeFilterDescriptorCollection>

              <rad:FilterDescriptor Member="Married" 

                          Operator="IsEqualTo" 

                          Value="{Binding SomeKey}" />

     </rad:CompositeFilterDescriptorCollection>

 </rad:RadGridView.FilterDescriptors>

 

What is the problem?  

 

Best  regards

Ehud

 

Alexandru
Top achievements
Rank 1
 answered on 12 Jan 2016
1 answer
426 views
Setting VirtualizingPanel.ScrollUnit="Pixel" makes it impossible to scroll by touch - it scrolls very very slowly.
Polya
Telerik team
 answered on 12 Jan 2016
4 answers
103 views

Hi, I am having an issue where if I add a RadBook as a Content template to a RadTileView, it throws an exception:

An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in PresentationCore.dll

Additional information: The parameter value must be greater than zero.

 This doesn't always happen but will if you move enough of them around.  If I take out the book control it works fine. Any Ideas?

 

-adam


 
Adam
Top achievements
Rank 1
 answered on 11 Jan 2016
1 answer
105 views

Hello;

 

I use telerik tile view in our project.

We have customized the template to add a "remove button" in the header by editing the tileview template. The delete button is available in the different views (small, normal & large). We have been requested to set the button only in small & normal view. So, how can we remove the "delete button" from the large view only.

 

Thanks for your replies.

Best regards

 

Evgenia
Telerik team
 answered on 11 Jan 2016
3 answers
265 views

I'm trying to format the String output for my Series Trackball so that it only shows 2 decimal places.  The code I have at the moment for my Template is as follows:

<telerik:RadCartesianChart.Resources>
<sys:String x:Key="CategoryFormat">Date: {0}</sys:String>
<sys:String x:Key="ValueFormat">Value: {0:n2}</sys:String>
                                                 
<DataTemplate x:Key="seriesTrackBallInfoTemplate">
      <StackPanel Orientation="Vertical">
       <TextBlock Text="{Binding Path=MeasurementData.Category, StringFormat={StaticResource CategoryFormat}}" />
        <TextBlock Text="{Binding Path=MeasurementData.Value, StringFormat={StaticResource ValueFormat}}" />
        </StackPanel>
</DataTemplate>
 </telerik:RadCartesianChart.Resources>

The type of MeasurementData.Value is Double.

I've tried various approaches and nothing seems to work.

Any suggestions?

 

 

Ivan
Telerik team
 answered on 11 Jan 2016
5 answers
379 views

I have the following XAML code I'm using to generate my Series and Graphs.

<telerik:RadCartesianChart x:Name="Chart"
                       HorizontalAlignment="Stretch"
                       VerticalAlignment="Stretch">
    <telerik:RadCartesianChart.ContextMenu>
        <ContextMenu>
            <MenuItem Header="Export to Image" Click="MenuItem_Click" />
        </ContextMenu>
    </telerik:RadCartesianChart.ContextMenu>
  
    <telerik:RadCartesianChart.Behaviors>
        <telerik:ChartPanAndZoomBehavior DragMode="Zoom" ZoomMode="Horizontal" />
    </telerik:RadCartesianChart.Behaviors>
  
    <telerik:RadCartesianChart.Grid>
        <telerik:CartesianChartGrid MajorLinesVisibility="XY" />
    </telerik:RadCartesianChart.Grid>
  
    <telerik:RadCartesianChart.Resources>
        <Style TargetType="telerik:LineSeries">
            <Setter Property="StrokeThickness" Value="1"/>
            <Setter Property="Stroke" Value="{Binding ValueColour}" />
            <Setter Property="RenderOptions" Value="{Binding RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}, Path=DataContext.RenderOptions, Mode=OneWay}" />
            <Setter Property="LegendSettings">
                <Setter.Value>
                    <telerik:SeriesLegendSettings>
                        <telerik:SeriesLegendSettings.Title>
                            <MultiBinding Converter="{StaticResource MultiBindingStringConverter}">
                                <Binding Path="ValueName" />
                                <Binding Path="Unit" />
                            </MultiBinding>
                        </telerik:SeriesLegendSettings.Title>
                    </telerik:SeriesLegendSettings>
                </Setter.Value>
            </Setter>
            <Setter Property="ShowLabels" Value="False" />
            <Setter Property="VerticalAxis">
                <Setter.Value>
                    <MultiBinding Converter="{StaticResource UnitToVerticalAxisConverter}">
                        <Binding Path="ValueName" />
                        <Binding Path="Unit" />
                    </MultiBinding>
                </Setter.Value>
            </Setter>
        </Style>
        <Style TargetType="telerik:PointSeries">
            <Setter Property="DefaultVisualStyle">
                <Setter.Value>
                    <Style TargetType="Path">
                        <Setter Property="Fill" Value="{Binding ValueColour, Converter={StaticResource StringToSolidColorBrushConverter}}" /> <!-- CAUSES AN INVALID CAST EXCEPTION -->
                    </Style>
                </Setter.Value>
            </Setter>
            <Setter Property="RenderOptions" Value="{Binding RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}, Path=DataContext.RenderOptions, Mode=OneWay}" />
            <Setter Property="LegendSettings">
                <Setter.Value>
                    <telerik:SeriesLegendSettings>
                        <telerik:SeriesLegendSettings.Title>
                            <MultiBinding Converter="{StaticResource MultiBindingStringConverter}">
                                <Binding Path="ValueName" />
                                <Binding Path="Unit" />
                            </MultiBinding>
                        </telerik:SeriesLegendSettings.Title>
                    </telerik:SeriesLegendSettings>
                </Setter.Value>
            </Setter>
            <Setter Property="ShowLabels" Value="False" />
            <Setter Property="VerticalAxis">
                <Setter.Value>
                    <MultiBinding Converter="{StaticResource UnitToVerticalAxisConverter}">
                        <Binding Path="ValueName" />
                        <Binding Path="Unit" />
                    </MultiBinding>
                </Setter.Value>
            </Setter>
        </Style>
    </telerik:RadCartesianChart.Resources>
      
    <telerik:RadCartesianChart.SeriesProvider>
        <telerik:ChartSeriesProvider Source="{Binding Series}">
            <telerik:ChartSeriesProvider.SeriesDescriptors>
                <telerik:CategoricalSeriesDescriptor ItemsSourcePath="Data.Collection" TypePath="SeriesType" CategoryPath="Time" ValuePath="Value" />
            </telerik:ChartSeriesProvider.SeriesDescriptors>
        </telerik:ChartSeriesProvider>
    </telerik:RadCartesianChart.SeriesProvider>
  
    <telerik:RadCartesianChart.HorizontalAxis>
        <telerik:DateTimeContinuousAxis
                                    MajorStepUnit="Minute"
                                    LabelInterval="4"
                                    FontFamily="Segoe UI"
                                    PlotMode="OnTicks"  LabelFitMode="MultiLine">
            <telerik:DateTimeContinuousAxis.LabelTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource MultiLineDateTimeConverter}}" />
                </DataTemplate>
            </telerik:DateTimeContinuousAxis.LabelTemplate>
        </telerik:DateTimeContinuousAxis>
    </telerik:RadCartesianChart.HorizontalAxis>
</telerik:RadCartesianChart>
 

Unfortunately when I try to bind the "ValueColour" property on my PointSeries style, for the Path style's Fill property, I get an invalid cast exception.

My ValueColour Property is of type String and I have tried using converters for both String to Color and String to SolidColorBrush and neither of them are working.  The cast exception I get says:

Additional information: Unable to cast object of type 'System.Windows.Data.Binding' to type 'System.Windows.Media.Brush'.

However it works if I hard-code the colour with the value "Red" for example.

 How do I make this data-bindable?

Ivan
Telerik team
 answered on 11 Jan 2016
1 answer
250 views

Hi

I am using a RadCartesianChart with a LineSeries and would like the line to be dotted between missing values (null) instead of a gap. How can I do this?

 Regards, Lukas

Ivan
Telerik team
 answered on 11 Jan 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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?