Consider this code, which displays a textbox with rounded corners:
<
Window
x:Class
=
"WpfApplication1.MainWindow"
xmlns:System
=
"clr-namespace:System;assembly=mscorlib"
Title
=
"MainWindow"
Height
=
"350"
Width
=
"525"
>
<
Window.Resources
>
<
ControlTemplate
TargetType
=
"TextBoxBase"
x:Key
=
"txt"
>
<
Border
Padding
=
"10"
CornerRadius
=
"10"
BorderThickness
=
"1"
BorderBrush
=
"Black"
x:Name
=
"Bd"
Background
=
"{TemplateBinding Panel.Background}"
>
<
ScrollViewer
Name
=
"PART_ContentHost"
SnapsToDevicePixels
=
"{TemplateBinding UIElement.SnapsToDevicePixels}"
/>
</
Border
>
<
ControlTemplate.Triggers
>
<
Trigger
Property
=
"UIElement.IsEnabled"
>
<
Setter
Property
=
"Panel.Background"
TargetName
=
"Bd"
>
<
Setter.Value
>
<
DynamicResource
ResourceKey
=
"{x:Static SystemColors.ControlBrushKey}"
/>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"TextElement.Foreground"
>
<
Setter.Value
>
<
DynamicResource
ResourceKey
=
"{x:Static SystemColors.GrayTextBrushKey}"
/>
</
Setter.Value
>
</
Setter
>
<
Trigger.Value
>
<
System:Boolean
>False</
System:Boolean
>
</
Trigger.Value
>
</
Trigger
>
</
ControlTemplate.Triggers
>
</
ControlTemplate
>
</
Window.Resources
>
<
Grid
>
<
TextBox
Template
=
"{StaticResource txt}"
Margin
=
"10"
Padding
=
"10"
Background
=
"Transparent"
BorderThickness
=
"0"
Width
=
"254"
Height
=
"55"
/>
</
Grid
>
</
Window
>
But if I add reference to telerik controls, then the border of the textbox is displayed again, regardles of the 'BorderThickness' property. This is my code in App.xaml (if I comment this out then everything is ok again):
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/System.Windows.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Docking.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Hi,
I have a large time period from 2010/1/1 to 2015/1/1 and I have a second interval support second for large range time
When I zoom in into the intervals, the project became stopped because of a System.OutOFMemoryException Error.
My questions :
1- Dose I use virtualization in correct way ?
2- Does the RadTimeLine Support the second interval for large period or my code is wrong?
My code :
<telerik:RadTimeline x:Name="RadTimeline1"
PeriodStart="{Binding StartDate, Mode=TwoWay}"
PeriodEnd="{Binding EndDate, Mode=TwoWay}"
StartPath="Date"
DurationPath="Duration"
IsSelectionEnabled="True"
SelectionMode="Extended"
VirtualizingPanel.IsVirtualizing="True"
ItemsSource="{Binding Data}">
<telerik:RadTimeline.Intervals>
<telerik:YearInterval />
<telerik:MonthInterval />
<telerik:WeekInterval />
<telerik:DayInterval />
<telerik:HourInterval />
<telerik:MinuteInterval />
<telerik:SecondInterval VirtualizingPanel.IsVirtualizing="True"/>
</telerik:RadTimeline.Intervals>
</telerik:RadTimeline>
Hi Telerik Team,
We have a several Widgets in Docking Control. Most Widgets have a PRISM Region in their Titlebar, this works good at the moment.
But when Widgets get floated into the ToolWindow and then readded to the Docking I get exceptions from Prism etc.
So I wanted to ask how do implement A Region inside Widget Title Bar Header that support Floating and readding to the Docking.
Thank you
Johannes
Hi,
As CheckedItems Event of RadTreeView is not giving results properly, we implemented RadTreeView Checkbox using MVVM using http://docs.telerik.com/devtools/wpf/controls/radtreeview/how-to/howto-tri-state-mvvm. Now, we are able to get the checked items properly.
Now, how should we support keyboard events like by pressing CTRl+Space , Node should get selected. Is there any way to handle this. If we do not use MVVM TriState check box, we can acheive by setting the property "IsOptionElementsEnabled" to true.
Please let me know your inputs.
Thanks,
Subhashini
I am trying to represent a Yes/No decision tree using the Diagram control. When rendered using the TreeDown, OrgChart layout/router, it seems that some nodes are rendered with minimal offset, while others are rendered so that there is no vertical alignment, yet I add the connectors in the same fashion.
See attached for an example. The result is that a significant amount of scrolling is needed to follow the connectors to the nodes.
Is there a way I can indicate that it is ok to draw nodes with vertical overlap (similar to how the "yes" path is drawn in the example), instead of the layout engine leaving room under shapes and causing the diagram to appear abnormally wide?
Hi,
we're using a RadGridView for displaying result sets of dynamic database queries. These queries are user-customizable and may (especially during design phase) yield several billions of rows.
The RadGridView is configured to use row virtualization. However, when using an IEnumerable-derived ResultsSet (which will load the requested items on the fly), all items are enumerated before the first few are being displayed. This operation requires a lot of memory and fails for larger result sets.
Before investing effort in implementing IQueryable for the ResultsSet object, we'd like to ensure this would enable us to dynamically load the currently displayed rows only.
Does anyone have any experience using RadGridView in such a scenario?
Any help is greatly appreciated!
Best regards,
Oliver
Hello there,
I have a rad chart which takes the definition as below :
<telerik:RadChart x:Name="rd3DChart" IsManipulationEnabled="True" Height="250" Margin="5,5,5,5" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="3">
<telerik:RadChart.DefaultView>
<telerik:ChartDefaultView>
</telerik:ChartDefaultView>
</telerik:RadChart.DefaultView>
<telerik:RadChart.SeriesMappings>
<telerik:SeriesMapping>
<telerik:SeriesMapping.SeriesDefinition>
<telerik:Pyramid3DSeriesDefinition ShowItemLabels="True" ItemLabelFormat="#YValue" ShowItemToolTips="True" ItemToolTipFormat="#XValue - #YValue">
</telerik:Pyramid3DSeriesDefinition>
</telerik:SeriesMapping.SeriesDefinition>
<telerik:SeriesMapping.ItemMappings>
<telerik:ItemMapping FieldName="YValue"
DataPointMember="YValue" />
<telerik:ItemMapping FieldName="XValue"
DataPointMember="Label" />
</telerik:SeriesMapping.ItemMappings>
</telerik:SeriesMapping>
</telerik:RadChart.SeriesMappings>
</telerik:RadChart>
I have a function which binds the values to the chart like :
private void PopulateAggregationChart()
{
rdAggregateExpanderGraph.Visibility = System.Windows.Visibility.Visible;
List<AggregateChartItem> charItems = new List<AggregateChartItem>();
AggregateChartItem temp = null;
rd3DChart.ItemsSource = null;
charItems = GetItemsToBindToChart();
CameraExtension cam = new CameraExtension();
cam.ZoomEnabled = true;
if (rd3DChart.DefaultView.ChartArea.Extensions.Count == 0)
rd3DChart.DefaultView.ChartArea.Extensions.Add(cam);
rd3DChart.ItemsSource = charItems;
}
I have added a check here on the extensions as clearing it and adding it again threw null reference exception. My Binding works the first time, but when I call this function to bind the graph with a different set of data, the graph is being painted as expected, but the camera extension is not applied to it.
Please help in how I can retain the camera extension throughout.