Telerik Forums
UI for WPF Forum
1 answer
1.9K+ views

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>

Sia
Telerik team
 answered on 11 Jun 2015
1 answer
130 views

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>

Petar Marchev
Telerik team
 answered on 11 Jun 2015
1 answer
138 views

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

Vladi
Telerik team
 answered on 11 Jun 2015
2 answers
298 views
Is there any easy way to get the current page count from a WPF RadDocument that is set to layout Paged?
Phoenix
Top achievements
Rank 1
 answered on 11 Jun 2015
4 answers
217 views

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

 

 

Martin Ivanov
Telerik team
 answered on 11 Jun 2015
4 answers
183 views

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?

 

Peshito
Telerik team
 answered on 11 Jun 2015
1 answer
60 views
Hello Telerik,

I updated my WPF project from  2014 Q3 to 2015 Q1 and it seems that the user insert of rows in the RadGridView dose not work any more and it seems that the ShowInsertRow property dose no longer exist?

Greetings Uwe
Dimitrina
Telerik team
 answered on 11 Jun 2015
1 answer
250 views

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

Dimitrina
Telerik team
 answered on 10 Jun 2015
3 answers
156 views
I,

I would like to know if it's possible to change the current month position in the display?
I mean, if I have a 3x3 calendar display, I would like to have the current month at the middle position or at the lower left position.

Thank's
Georgi
Telerik team
 answered on 10 Jun 2015
3 answers
43 views

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.

Peshito
Telerik team
 answered on 10 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?