Hello together,
I have previously a long peace of code to make a listview bound to a Datasource with all calendar weeks in a range. On Click on first level a listview was loaded under the clicked week with all dates in this week. The color of each week or day was based on the 'Farbe'. A calculated property based on plan and reality.
If the day was completely set to 0 plan, it was disabled, so it could'nt be cklicked anymore.
I now wanted to achieve the same, maybe simplier with a PanelBar. But I have to problem, I don't get the color and disable to work.
I have seta hierarchical dataTemplate as Itemtemplate and of course set the Itemsource in Code behind.
The Problem is, if I set the color of a Stackpanel or something else in the Template the color not affects the background of the expander and everything else.
I tried to set a PanelBarItem as Template but there I have a visual and clickable second object in my normal Item, plus the background not affects anything.
I then a project where someone set ItemCOntainerStyle and ItemStyle, but if I do this my whole PanelBar is empty.
Here is my old listview:
<ListView
Grid.Column="0"
Grid.Row="1"
Name="lvWochen"
Background="{DynamicResource MaterialDesignPaper}"
IsSynchronizedWithCurrentItem="True"
SelectedValuePath="KWJahr"
BorderThickness="0"
>
<ListView.ItemContainerStyle>
<Style
TargetType="ListViewItem"
>
<Setter
Property="Background"
Value="Transparent"
/>
<Setter
Property="Margin"
Value="5 2 5 2"
/>
<Setter
Property="Template"
>
<Setter.Value>
<ControlTemplate
TargetType="ListViewItem"
>
<materialDesign:Card
Foreground="{DynamicResource MaterialDesignBody}"
Margin="2,5,2,0"
MouseDown="lvWochen_MouseDown"
>
<materialDesign:Card.Style>
<Style
BasedOn="{StaticResource CardCustom}"
TargetType="{x:Type materialDesign:Card}"
>
</Style>
</materialDesign:Card.Style>
<materialDesign:Card.Background>
<Binding
Path="Farbe"
/>
</materialDesign:Card.Background>
<Border
BorderThickness="2"
BorderBrush="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.BorderColor}"
>
<StackPanel
Margin="3,3,3,3"
>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid
Grid.Column="0"
>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40*"/>
<ColumnDefinition Width="60*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock
Grid.Column="0"
Grid.Row="0"
FontSize="{StaticResource Body}"
FontWeight="Medium"
>
<TextBlock.Text>
<MultiBinding
StringFormat="{}KW {0} Jahr {1}"
>
<Binding
Path="KW"
/>
<Binding
Path="Jahr"
/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock
Grid.Column="0"
Grid.Row="1"
FontSize="{StaticResource Caption}"
FontWeight="Regular"
>
<TextBlock.Text>
<MultiBinding
StringFormat="{}{0:dd.MM.yy} - {1:dd.MM.yy}"
>
<Binding
Path="MinDatum"
/>
<Binding
Path="MaxDatum"
/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<Grid
Grid.Column="1"
Grid.Row="1"
>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50*"/>
<ColumnDefinition Width="50*"/>
</Grid.ColumnDefinitions>
<TextBlock
Grid.Column="0"
FontSize="{StaticResource Body}"
FontWeight="Regular"
Visibility="{Binding Path=AufwandEMVisibility}"
HorizontalAlignment="Left"
Margin="5,0,0,0"
>
<TextBlock.Text>
<MultiBinding
StringFormat="{}Aufwand EM: {0:#,0}"
>
<Binding
Path="AufwandEM"
/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock
Grid.Column="1"
FontSize="{StaticResource Body}"
FontWeight="Regular"
Visibility="{Binding Path=AufwandEMVisibility}"
HorizontalAlignment="Left"
Margin="5,0,0,0"
>
<TextBlock.Text>
<MultiBinding
StringFormat="{}Einzelteile: {0}"
>
<Binding
Path="Einzelteile"
/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</Grid>
<Grid
Grid.Column="1"
Grid.Row="0"
>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50*"/>
<ColumnDefinition Width="50*"/>
</Grid.ColumnDefinitions>
<TextBlock
Grid.Column="0"
Text="{Binding Path=PlanZellen, StringFormat={}Planzellen: {0}}"
FontSize="{StaticResource Body}"
FontWeight="Medium"
HorizontalAlignment="Left"
Margin="5,0,0,0"
>
</TextBlock>
<TextBlock
Grid.Column="1"
FontSize="{StaticResource Body}"
FontWeight="Medium"
HorizontalAlignment="Left"
Margin="5,0,0,0"
>
<TextBlock.Text>
<MultiBinding
StringFormat="{}{0}: {1}"
>
<Binding
Path="ZellenArt"
/>
<Binding
Path="Zellen"
/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</Grid>
<Grid
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="5,0,0,0"
>
<TextBlock
Grid.Column="0"
Text="{Binding Path=Einträge, StringFormat={}Einträge: {0}}"
FontSize="{StaticResource Caption}"
FontWeight="Regular"
HorizontalAlignment="Center"
>
</TextBlock>
</Grid>
</Grid>
<materialDesign:PackIcon
Grid.Column="2"
Kind="CheckAll"
Visibility="{Binding Path=FertigAVVisibility}"
VerticalAlignment="Center"
Foreground="#1B5E20"
/>
<ToggleButton
Grid.Column="1"
VerticalAlignment="Center"
Style="{StaticResource MaterialDesignActionToggleButton}"
Background="Transparent"
Click="ToggleButton_Click"
IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.IsExpanded, Mode=OneWay}"
>
<ToggleButton.Content>
<materialDesign:PackIcon
Kind="ChevronDown"
/>
</ToggleButton.Content>
<materialDesign:ToggleButtonAssist.OnContent>
<materialDesign:PackIcon
Kind="ChevronUp"
/>
</materialDesign:ToggleButtonAssist.OnContent>
</ToggleButton>
</Grid>
<ListView
Name="lvTage"
Background="Transparent"
IsSynchronizedWithCurrentItem="True"
SelectedValuePath="DatumD"
BorderThickness="0"
PreviewMouseWheel="lvTage_PreviewMouseWheel"
ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.TageDatas}"
Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.TagVisible}"
>
<ListView.ItemContainerStyle>
<Style
TargetType="ListViewItem"
>
<Setter Property="LayoutTransform">
<Setter.Value>
<ScaleTransform x:Name="transform" />
</Setter.Value>
</Setter>
<Setter
Property="Background"
Value="Transparent"
/>
<Setter
Property="Margin"
Value="5 2 5 2"
/>
<Setter
Property="Template"
>
<Setter.Value>
<ControlTemplate
TargetType="ListViewItem"
>
<materialDesign:Card
Foreground="{DynamicResource MaterialDesignBody}"
Margin="2,5,2,0"
PreviewMouseLeftButtonDown="lvTage_MouseDown"
IsEnabled="{Binding Path=Aktiviert}"
>
<ig:DragDropManager.DropTarget>
<ig:DropTarget IsDropTarget="True"/>
</ig:DragDropManager.DropTarget>
<materialDesign:Card.Style>
<Style
BasedOn="{StaticResource CardCustom}"
TargetType="{x:Type materialDesign:Card}"
>
</Style>
</materialDesign:Card.Style>
<materialDesign:Card.Background>
<Binding
Path="Farbe"
/>
</materialDesign:Card.Background>
<Border
BorderThickness="2"
BorderBrush="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.BorderColor}"
>
<StackPanel
Margin="3,3,3,3"
>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30*"/>
<ColumnDefinition Width="70*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock
Grid.Column="0"
Grid.Row="0"
FontWeight="Medium"
FontSize="{StaticResource Body}"
Text="{Binding Path=DatumD, StringFormat={}{0:dd.MM.yyyy}}"
/>
<Grid
Grid.Column="1"
Grid.Row="1"
>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50*"/>
<ColumnDefinition Width="50*"/>
</Grid.ColumnDefinitions>
<TextBlock
Grid.Column="0"
FontSize="{StaticResource Body}"
FontWeight="Regular"
Visibility="{Binding Path=AufwandEMVisibility}"
HorizontalAlignment="Left"
Margin="5,0,0,0"
>
<TextBlock.Text>
<MultiBinding
StringFormat="{}Aufwand EM: {0:#,0}"
>
<Binding
Path="AufwandEM"
/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock
Grid.Column="1"
FontSize="{StaticResource Body}"
FontWeight="Regular"
Visibility="{Binding Path=AufwandEMVisibility}"
HorizontalAlignment="Left"
Margin="5,0,0,0"
>
<TextBlock.Text>
<MultiBinding
StringFormat="{}Einzelteile: {0}"
>
<Binding
Path="Einzelteile"
/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</Grid>
<Grid
Grid.Column="1"
Grid.Row="0"
>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50*"/>
<ColumnDefinition Width="50*"/>
</Grid.ColumnDefinitions>
<TextBlock
Name="expanderTag"
Grid.Column="0"
Text="{Binding Path=PlanZellen, StringFormat={}Planzellen: {0}}"
FontSize="{StaticResource Body}"
FontWeight="Medium"
HorizontalAlignment="Left"
Margin="5,0,0,0"
>
</TextBlock>
<TextBlock
Grid.Column="1"
FontSize="{StaticResource Body}"
FontWeight="Medium"
HorizontalAlignment="Left"
Margin="5,0,0,0"
>
<TextBlock.Text>
<MultiBinding
StringFormat="{}{0}: {1}"
>
<Binding
Path="ZellenArt"
/>
<Binding
Path="Zellen"
/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</Grid>
<Grid
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="5,0,0,0"
>
<TextBlock
Grid.Column="0"
Text="{Binding Path=Einträge, StringFormat={}Einträge: {0}}"
FontSize="{StaticResource Caption}"
FontWeight="Regular"
HorizontalAlignment="Center"
>
</TextBlock>
</Grid>
<Grid
Grid.Column="2"
Grid.Row="0"
Grid.RowSpan="4"
>
<materialDesign:PackIcon
Kind="CheckAll"
Visibility="{Binding Path=FertigAVVisibility}"
VerticalAlignment="Center"
Foreground="#1B5E20"
/>
</Grid>
</Grid>
</StackPanel>
</Border>
</materialDesign:Card>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=IsVisible}"
Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.5"/>
<DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" From="0" Duration="0:0:0.3"/>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
</DataTrigger>
</Style.Triggers>
</Style>
</ListView.ItemContainerStyle>
</ListView>
</StackPanel>
</Border>
</materialDesign:Card>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListView.ItemContainerStyle>
</ListView>
I hope someone has an idea.
Greetings Benedikt
Hi,
I have a program that imitates a physical sheet of paper, with an area that the user can input information. For the input area I'm using a RichTextBox, so the user can paste images, format etc. However, as the page is to be printed on a single piece of paper I want to limit the amount the user can enter. I've disabled the scrollbars so the user cannot scroll up and down, but they can still keep typing as if the document was infinite and the text just disappears. Is there any way to limit the input to only the visible area?

Hi,
I have a dashboard with 3 RadCartesianCharts (2 bar charts, 1 line chart) all based on date values for category bindings and numeric values for value bindings.
Both the date values and the value values can vary considerably depending on filters set, so I set up value converters to dynamically adjust the axis labels and tooltips accordingly.
I was successful with all the horizontal axis and tooltips, but not with the y-axis values.
My goal is to adjust the y-axis values based on the size of the values, i.e. thousands vs millions vs billions. I use the following code to properly format the tooltips:
double measureValue = double.Parse(value.ToString());
if (measureValue > 999999999 || measureValue < -999999999)
{
formatString = "0,,,.###B";
}
else if (measureValue > 999999 || measureValue < -999999)
{
formatString = "0,,.##M";
}

Our customer is using our application (using RadMap) with a custom tiled data source to a remote map data source across a very slow network. Can you tell me:
1. What timeout is used for web requests to the map data source? (I believe the default timeout for WebRequest is 100 seconds)
2. Is it possible to change the timeout on the web requests for tiles?
3. What happens if a tile request times-out? Our customer suspects that the Telerik code is caching the timed-out tile response - is that true?
We are currently using Telerik v2019.1.116.45
Thanks
Pete

Hi together,
I have previously used the following lines to get the MaskedTextInput to wrapp the text.
I have no installed the last update (R3) and now it says: "The object reference is not declared onto a object instance."
The code still works but in the designer it marks it as wrong and doesn't update the preview anymore.
If I let the BasedOn apart it shows everything as it should bot the code not works anymore as it should. So the MaskedInput is empty and I can't click it anymore.
Without Wrapping the too long lines, well, are too long.
<telerik:RadMaskedTextInput.TextBoxStyle>
<Style TargetType="maskedInput:PreviewInputTextBox" BasedOn="{StaticResource MaskedInputTextBoxStyle}">
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="AcceptsReturn" Value="True" />
</Style>
</telerik:RadMaskedTextInput.TextBoxStyle>
Greetings,
Benedikt
Hey,
I am trying to create a Telerik Data Grid (RadGridView) which styles each line dynamically based on some data triggers. I am using VS2019, .NET 4.6 WPF with Telerik 2019.2 NOXAML.
As I did not know how I searched the web (including this forum) and identified a basic solution. Using
<telerik:RadGridView.RowStyle>
<Style TargetType="telerik:GridViewRow">
<Setter Property="Background" Value="Red"/>
<Setter Property="Foreground" Value="White"/>
</Style>
</telerik:RadGridView.RowStyle>
I should be able to style every row red/white (for starters ...). This is from the example here (https://docs.telerik.com/devtools/wpf/controls/radgridview/styles-and-templates/styling-a-row) which is not really good because it does not tell me HOW to define it exactly on my grid. However I also found an example from the forum from 2010 (https://www.telerik.com/forums/setting-radgridview-row-background-color-based-on-the-value-of-a-column-in-the-row) which uses the styling as you see above. The example works however my grid simply shows "nothing" as soon as I use the style definition.
This is my grid which I simplified for you:
App.xml:
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/System.Windows.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Controls.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Controls.GridView.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Grid.xml:
<telerik:RadGridView ItemsSource="{Binding MyObservableList}" AutoGenerateColumns="False" RowIndicatorVisibility="Collapsed">
<telerik:RadGridView.RowStyle>
<Style TargetType="telerik:GridViewRow">
<Setter Property="Background" Value="Red"/>
<Setter Property="Foreground" Value="White"/>
</Style>
</telerik:RadGridView.RowStyle>
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding idx}" Header="ID" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Description" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Hello guys.
Im using Telerik 2015 Q3 for WPF (2015.3.930.45) and i have a problem with the tabindex inside mi form.
I have a form with several RadComboBox, textboxes...
If I place a textbox (Tabindex = 0), a radcombobox (Tabindex = 1) and anoche textbox (Tabindex = 2), when i press tab in the first textbox focus goes to the other textbox, and then, the next focused item is the radcombobox.
Its like ui always focus windows UI controls before radcombobox.
How can I solve this problem? I need that tabindex works like it should work...
Regars
Hello
Our horizontal axis is always a frequency, is it possible to display the unit kilo/Meg/Gig,
for example display 1.2 GHz, 100kHz, 10MHz instead of 1200000 Hz, 100000Hz, 10000000Hz ?
thanks
