Telerik Forums
UI for WPF Forum
1 answer
821 views
Hi,

in my form, I created a FocusVisualStyle for my control. For my TextBox it work but for Telerik RadDatePicker it doesn't work :(
I want to know how I can change teh FocusVisualStyle of Telerik controls to have the same than the standard controls.

PS: You have to keep in mind that all my forms reside in a DLL which is called by a WinFrom application ;)

Here is part of my xaml:

    <telerik:RadWindow.Resources>
        <ResourceDictionary>
            <ControlTemplate x:Key="FocusTemplate" >
                <Rectangle Margin="-3" Stroke="Orange" StrokeThickness="2" RadiusX="2" RadiusY="2" StrokeDashArray="2,1">
                    <Rectangle.Triggers>
                        <EventTrigger RoutedEvent="Rectangle.Loaded">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation To="3" Duration="0:0:1" RepeatBehavior="Forever" Storyboard.TargetProperty="StrokeDashOffset" />
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </Rectangle.Triggers>
                </Rectangle>
            </ControlTemplate>


            <Style x:Key="FocusStyle" TargetType="{x:Type Control}">
                <Setter Property="Template" Value="{StaticResource FocusTemplate}"/>
            </Style>

            <Style TargetType="TextBox">
                <Setter Property="FocusVisualStyle" Value="{StaticResource FocusStyle}"/>
            </Style>

            <Style TargetType="telerik:RadDatePicker">
                <Setter Property="FocusVisualStyle" Value="{StaticResource FocusStyle}"/>
            </Style>

            <helper:BoolToVisibility x:Key="boolToVisibility" />
            <helper:BoolToVisibilityInverter x:Key="boolToVisibilityInverter" />
            <helper:BoolInverter x:Key="boolInverter" />
           
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="BillingDetails-Fr-Res.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/Resources;component/Neuron-CustomStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
           
        </ResourceDictionary>
    </telerik:RadWindow.Resources>

<telerik:RadDatePicker Grid.Column="3" Grid.Row="0" Margin="5 5 0 0" HorizontalAlignment="Left" IsEnabled="{Binding ElementName=Me, Path=IsReadOnly, Converter={StaticResource boolInverter}}" SelectedValue="{Binding ElementName=Me, Path=Visit.VisitDate, Mode=TwoWay}" />                       
Dani
Telerik team
 answered on 12 Apr 2012
2 answers
196 views
Hello,

I'm having trouble understanding the DeleteBehavior, BackspaceBehavior, and DeleteSelectedBehavior properties in annotations.  They do not seem to be working how I would expect them to.

I would like to have a custom annotation that works almost exactly like a read-only annotation range, but I would like to be able to select and delete the entire annotation range, including the text, from the UI.

I assumed that I would be able to customize this behavior by setting the DeleteBehavior, BackspaceBehavior, and DeleteSelectedBehavior, but it doesn't seem to work regardless of what settings I specify in those overridden properties.

Is it even possible to do what I am asking?

Thanks,

Frank
Frank
Top achievements
Rank 1
 answered on 12 Apr 2012
4 answers
133 views
I have implemented the use of the 2D chart (bar, line, splinearea, splineseries) in software and have no problems setting the graphing color fill for each series in the charts data set.  I was hoping that the 3D chart used the same methodology but this does not appear to be the case.  I need to be able to set each series to a user chosen color.  It should not be this hard but I can't find any information on how to set up each series.  It appears that the chart just picks each color automatically without giving the ability to have it manually set.  Please help! 

The way that I set the color with the 2D charts is as follows:
 lineSeries.Definition.Appearance.Stroke = new SolidColorBrush(Colors.Blue);
 lineSeries.Definition.Appearance.Fill = new SolidColorBrush(Colors.Blue);

If I change the lineSeries type to Line3DSeriesDefinition then the default aqua color that comes up with the examples is used even when the color Blue is set as defined above.

Thanks for any help that can be provided!

James
James
Top achievements
Rank 1
 answered on 12 Apr 2012
8 answers
218 views
I need to know how to set the background color of the charting area of a 3D chart.  For the 2D chart I create a MarkedZone object and apply a solidcolorbrush as follows:
 MarkedZone bgZone = new MarkedZone();
 bgZone.Background = new SolidColorBrush(Colors.Aqua);
 this.radChart1.DefaultView.ChartArea.Annotations.Clear();
 this.radChart1.DefaultView.ChartArea.Annotations.Add(bgZone);

This does not work for the 3D chart!  How would I make this work for the 3D chart or is it even possible.

Thanks,

James


James
Top achievements
Rank 1
 answered on 12 Apr 2012
5 answers
328 views
Hi,

I have made a DayTemplateSelector - allowing me to style the calendar (highlighting different dates with colors..).
This works fine with all the different themes except the "Expression_Dark" theme (the dates are not highlighted with my color)
See attached images...(with and without "Expression_Dark" theme)
1. Any ideas why this theme is different from the others?

2. How can I decrease the height/width on the areas that show day/weeknumber?
They take up way too much space...(I have marked the areas with green color on image: RadCalendar - DayTemplateSelector 2.png)

<Controls:RadCalendar x:Name="TommedatoKalender" 
                                          Rows="3" Columns="4"
                                          SelectionMode="Extended"                                                  
                                          ViewsHeaderVisibility="Visible"
                                          DisplayDate="{Binding DisplayDate}">                                        
  
                                        <Controls:RadCalendar.DayTemplateSelector>
                                            <selector:KalenderDagSelector>
                                                <selector:KalenderDagSelector.DefaultTemplate>
                                                    <DataTemplate>
                                                        <TextBlock Text="{Binding Text}" Height="18" Width="18" TextAlignment="Center"/>
                                                    </DataTemplate>
                                                    </selector:KalenderDagSelector.DefaultTemplate>
  
                                                   <selector:KalenderDagSelector.TommeDagTemplate>
                                                    <DataTemplate>
                                                        <Border BorderThickness="1" 
                                                        BorderBrush="{DynamicResource HighlightDayColor}" 
                                                        CornerRadius="12" 
                                                         HorizontalAlignment="Center" VerticalAlignment="Center"      Background="{DynamicResource HighlightDayColor}">
                                                            <Grid>
                                                                <!-- Rounded mask (stretches to fill Grid) -->
                                                                <Border Name="mask" Background="{DynamicResource HighlightDayColor}" CornerRadius="7"/>
                                                                <!-- Main content container -->
                                                                <StackPanel>
                                                                    <!-- Use a VisualBrush of 'mask' as the opacity mask -->
                                                                    <StackPanel.OpacityMask>
                                                                        <VisualBrush Visual="{Binding ElementName=mask}"/>
                                                                    </StackPanel.OpacityMask>
                                                                    <!-- Content -->
                                                                    <TextBlock Text="{Binding Text}" Background="{DynamicResource HighlightDayColor}" Height="18" Width="18" TextAlignment="Center" />
                                                                </StackPanel>
                                                            </Grid>
                                                        </Border>
                                                    </DataTemplate>
                                                </selector:KalenderDagSelector.TommeDagTemplate>
  
                                            </selector:KalenderDagSelector>
                                        </Controls:RadCalendar.DayTemplateSelector>
  
                                    </Controls:RadCalendar>
Terje Johansen
Top achievements
Rank 1
 answered on 12 Apr 2012
7 answers
248 views
In a current project, we've used the TreeListView to display hierachical data (sreenshot attached).

What we want to do is to expand all lines of a specific level.
For example (see screenshot) :
 > when the user clicks on button "1", all "level 1" lines should expand
 > when the user clicks on button "2", all "level 1 and 2" lines should expand
etc.

We've succeeded doing this scenario with a Style Selector (already used for background coloration) :

<styleSelectors:ConditionalStyleSelector.Level1Style>
     <Style TargetType="telerik:TreeListViewRow">
          <Setter Property="Background" Value="#6699FF" />
          <Setter Property="IsExpanded" Value="{Binding Path=IsExpandedLevel1, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Mode=TwoWay}" />
     </Style>
</styleSelectors:ConditionalStyleSelector.Level1Style>

However, when the user collapses one "level 2" line (for example) all "level 2" lines are collasped.
So we've changed the binding mode to "OneWay" :

<Setter Property="IsExpanded" Value="{Binding Path=IsExpandedLevel1, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Mode=OneWay}" /> 

However, with mode "OneWay" it doesn't work ...

Any idea ? Or sample code to do this ?
Vera
Telerik team
 answered on 12 Apr 2012
3 answers
383 views
Hi,

I hit the captioned issue that Drop Down of RadComboBox is Going to the Top Left Corner of the Screen.
It's does not happen all the time, but sometimes it does happen.

Is there any way to solve this?

Thanks
Ric Yik
Konstantina
Telerik team
 answered on 12 Apr 2012
12 answers
326 views
I'm evalulating Rad Charts as a possible component for my company and seem to have hit a wall.  Is it possible to have a bar chart, with positive and negative values on the same series and have the x-axis held at zero?  This would be very common in the financial world for say a performance chart.  Some bars go up, some bars go down depending on positive and negative performance buckets.  Am I correct in thinking the product does not currently support this?  

Many thanks,
     Chris Dietz
Zubair
Top achievements
Rank 1
 answered on 12 Apr 2012
2 answers
135 views
Hi!

Please advice me on how can I customize the weekinterval so that it starts from Wednesday of a week and to end to Tuesday the next week (in my company the operational weeks are formed this way).
I have a table in which these weeks are kept.
If there'e a way I can bind TimeBar to this table, I will be glad to receive some help.

I attached a capture with the intervals and the selection made using my weeks table (you will see selection slightly shifted to capture those mentioned above)

Thank you in advance!
Adi
Adi Constantin
Top achievements
Rank 2
 answered on 12 Apr 2012
1 answer
214 views
Hi,

I am having an issue with styling MapPolygons. I am able to style some settings such as the tooltip but am unsuccessful in styling other aspects like the border.

What I am trying to do is apply an Effect to a MapPolygon when the mouse is over it. Below is a Xaml snippet of my style, which doesn't work with or without the trigger. 

<Style x:Key="zoneStyle" TargetType="telerik:MapPolygon">
    <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="True">
            <Setter Property="Effect">
                <Setter.Value>
                    <DropShadowEffect ShadowDepth="3" BlurRadius="3" Color="Purple"/>
                </Setter.Value>
            </Setter>
        </Trigger>
    </Style.Triggers>
</Style>

Applying a BorderBrush in the style doesn't work either. Is there something I am missing?

Thanks in advance.

Nick
Andrey
Telerik team
 answered on 12 Apr 2012
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?