Telerik Forums
UI for WPF Forum
12 answers
386 views
I want to change the Foreground and Background of the Month and Year Button (Currently by default the foreground is grey and the background also). What is the simplest way of doing that.

Attached is the current view (December 2009)

Thanks,
Anjan
Konstantina
Telerik team
 answered on 15 Apr 2010
1 answer
128 views
Hello.

I have trouble to programatically acces element in TitleTemplate of RadPane.
I have this following style applied to my RadPane, where is also specified the DataTemplate of TitleTemplate.
For example I would like to acces the "PART_ParentControls" element. Can you please help me ?
Thanks a lot.
Here is the style xaml:

   <Style x:Key="TelerikRadPaneStyle1" TargetType="{x:Type telDockingControls:RadPane}">
        <Setter Property="CanUserPin" Value="False" />
        <Setter Property="CanFloat" Value="True" />
        <Setter Property="CanUserClose" Value="False" />
        <Setter Property="ContextMenuTemplate">
            <Setter.Value>
                <DataTemplate>
                    <telNavigationControls:RadContextMenu Visibility="Collapsed" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="TitleTemplate">
            <Setter.Value>
                <DataTemplate >
                    <Grid x:Name="mainGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="20" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <Border BorderThickness="1" BorderBrush="Black" Margin="0,5,2,5" >
                            <Canvas Grid.Column="0" Background="White" Opacity="1" IsHitTestVisible="True" ToolTip="Drag to move the window" />
                        </Border>
                        
                         <breadCrumbBar:BreadcrumbBar x:Name="bar" Grid.Column="1" Margin="1" Path="News"
                                                            TraceBinding="{Binding XPath=@title}" BorderBrush="{x:Null}"
                                                            Root="{StaticResource dataProvider}" Background="Transparent"
                                                            >
                            <breadCrumbBar:BreadcrumbBar.PreButtons>
                                <Button>
                                    <Image Style="{StaticResource Backward}" Opacity="0.8" Width="16" Height="16"/>
                                </Button>
                                <Button>
                                    <Image Style="{StaticResource Forward}" Opacity="0.8" Width="16" Height="16"/>
                                </Button>
                            </breadCrumbBar:BreadcrumbBar.PreButtons>
                            <breadCrumbBar:BreadcrumbBar.Buttons>
                                <Button>
                                    <Image Style="{StaticResource Close}" Opacity="0.5" Width="16" Height="16" HorizontalAlignment="Right"/>
                                </Button>
                            </breadCrumbBar:BreadcrumbBar.Buttons>
                        </breadCrumbBar:BreadcrumbBar>
                        
                        <Grid Grid.Column="2" x:Name="PART_ParentControls" />
                        
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
Miroslav Nedyalkov
Telerik team
 answered on 15 Apr 2010
7 answers
166 views
Hi

I have the following code and I'm taking an "Object reference not set ..." when I use Bar3DSeriesDefinition.
But when I set SeriesDefinition to a 2D definition (e.g. BarSeriesDefinition), everything is OK !!!
What I'm doing wrong?

    Dim dt As New DataTable 
    dt.Columns.Add("Year"GetType(String)) 
    dt.Columns.Add("Sales"GetType(Double)) 
    dt.Rows.Add("2007", 37000) 
    dt.Rows.Add("2008", 42000) 
    dt.Rows.Add("2009", 47000) 
    dt.Rows.Add("2010", 44000) 
 
    With Me.RadChart1 
      Dim sm As New SeriesMapping 
      sm.SeriesDefinition = New Bar3DSeriesDefinition 'BarSeriesDefinition  
      sm.ItemMappings.Add(New ItemMapping("Year", DataPointMember.XCategory)) 
      sm.ItemMappings.Add(New ItemMapping("Sales", DataPointMember.YValue)) 
      .SeriesMappings.Add(sm) 
      .ItemsSource = dt 
    End With 
 

Vladimir Milev
Telerik team
 answered on 15 Apr 2010
2 answers
177 views
Good morning,

In my program, I've got 2 RadTileView.Items : one is visible and the second one is hidden depending of the number of image to display.
The first one is always visible and Maximized.

But if I change the Visibility Property of the second one to Visible, the first RadTitleView.item hide the second one.
I notice that the position property of the second one is equal to -1.

If the 2 items are visible when I start the program, the property of the second is equal to 1.

Do you have a solution to reorder the radTileView?

thanks

Madovi
Top achievements
Rank 1
 answered on 15 Apr 2010
3 answers
141 views
Hello,
I am using a slider such as the one below:
<telerik:RadSlider   
  Minimum="0" 
  Maximum="10" 
  TickFrequency="1" 
  IsSelectionRangeEnabled="True" 
  IsSnapToTickEnabled = "True" 
  MinimumRangeSpan="1" 
  SelectionStart="1" 
  SelectionEnd="2" 
/> 

Correct me if I am wrong, but I guess there is a problem, if you drag the SelectionRange area to the right, then you won't be able to move it to the left.
Is there a solution for this behavior?
Thanks :)
Tina Stancheva
Telerik team
 answered on 15 Apr 2010
1 answer
142 views
Hi,

I'm adding instances of RadPane to a RadPaneGroup at runtime following a RadMenuItem click event:
        private void RadMenuItem_Click(object sender, Telerik.Windows.RadRoutedEventArgs e) 
        { 
            RadPane rp = new RadPane(); 
            rp.Header = "New Foo"
            rp.VerticalAlignment = VerticalAlignment.Top; 
            rp.Name = "Foo"
            rp.IsSelected = true
            radPaneGroup1.AddItem(rp, Telerik.Windows.Controls.Docking.DockPosition.Center); 
 
            Foo foo = new Foo(); 
            rp.Content = foo; 
        } 
 

The RadPane is shown as the last pane in the group and appears to have the focus as the pane header is highlighted.
However, my user control, "Foo", isn't shown in the RadPane.

Please note: This has only started happening with the Q1 2010 WPF controls! This doesn't happen with the Q3 2009 WPF controls.

If I click on a different pane then back to my new pane, the user control, "Foo", is now visible in the new pane!

If there is more than 1 pane displayed I can use this code as a workaround at the end of my click event:
            foreach (RadPane pane in radPaneGroup1.Items) 
            { 
                pane.Focus(); 
            } 
The above workaround doesn't work if the pane added is the only pane in the group.

I tried the code in Miroslav's blog but this didn't work for me either:
http://blogs.telerik.com/miroslavnedyalkov/posts/10-03-04/how_to_activate_a_pane_in_the_telerik_docking_control_for_wpf_and_silverlight.aspx

Any idea what I need to add to make my code work with the new version of these controls?

Thanks,
Mark






Miroslav Nedyalkov
Telerik team
 answered on 15 Apr 2010
2 answers
134 views
I'm trying to get a subproperty formatted, but it doesn't seem to be working. It's just showing the value without any formatting.

My xaml:

<Window x:Class="GridFormatTest.MainWindow" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Title="MainWindow" Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:System="clr-namespace:System;assembly=mscorlib"
    <Grid Loaded="Grid_Loaded"
        <telerik:RadGridView HorizontalAlignment="Left" Name="radGridView1" VerticalAlignment="Top" Height="311" Width="503"
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn Header="Works" DataMemberBinding="{Binding Size}" DataFormatString="{}{0:N}"/> 
                <telerik:GridViewDataColumn Header="Doesn't work" DataMemberBinding="{Binding SubItem.SubSize}" DataFormatString="{}{0:N}" DataType="{x:Type System:Double}"/> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
    </Grid> 
</Window> 

The code:

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using System.Windows; 
using System.Windows.Controls; 
using System.Windows.Data; 
using System.Windows.Documents; 
using System.Windows.Input; 
using System.Windows.Media; 
using System.Windows.Media.Imaging; 
using System.Windows.Navigation; 
using System.Windows.Shapes; 
 
namespace GridFormatTest 
    public class Order 
    { 
        public Order() 
        { 
            this.Size = 12000.0; 
            this.SubItem = new SubOrder(); 
        } 
 
        public double Size { getprivate set; } 
 
        public SubOrder SubItem { getset; } 
    } 
 
    public class SubOrder 
    { 
        public SubOrder() 
        { 
            this.SubSize = 150000; 
        } 
 
        public double SubSize { getset; } 
    } 
 
    /// <summary> 
    /// Interaction logic for MainWindow.xaml 
    /// </summary> 
    public partial class MainWindow : Window 
    { 
        public MainWindow() 
        { 
            InitializeComponent(); 
        } 
 
        private void Grid_Loaded(object sender, RoutedEventArgs e) 
        { 
            radGridView1.ItemsSource = new List<Order> 
            { 
                new Order(), 
                new Order() 
            }; 
        } 
    } 

As you can see I've also tried to set the DataType manually, which I noticed was the solution to another similar problem I found on the forums. But that doesn't help.

Any suggestions?
Yordanka
Telerik team
 answered on 15 Apr 2010
1 answer
237 views
I am using nested tabs and styling my high-level tabs not to look like tabs. They are more like a simple header link list. The styling has worked fine, was easy, but I would like to change the fontweight to bold on mouseover. Here is the section of code I am using. The styling of the IsSelected states is working fine, but I can't get the IsMouseOver styling to work. What am I doing wrong?


 

 

<ControlTemplate.Triggers>

 

 

 

<Trigger Property="IsMouseOver" Value="True">

 

 

 

<Setter Property="Stroke" TargetName="OuterPath" Value="#6600BCFF"/>

 

 

 

<Setter Property="Stroke" TargetName="OuterFill" Value="#6600BCFF"/>

 

 

 

<Setter Property="FontWeight" TargetName="HeaderElement" Value="Bold"/>

 

 

 

<Setter Property="FontSize" TargetName="HeaderElement" Value="16"/>

 

 

 

<Setter Property="Foreground" TargetName="HeaderElement" Value="Blue"/>

 

 

 

<Setter Property="Background" TargetName="InnerFill">

 

 

 

<Setter.Value>

 

 

 

<LinearGradientBrush EndPoint="0.500008,0" StartPoint="0.500008,1.00006">

 

 

 

<GradientStop Color="#FFE3F6FF" Offset="0"/>

 

 

 

<GradientStop Color="#FFBFEAFF" Offset="1"/>

 

 

 

</LinearGradientBrush>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

<Setter Property="Fill" TargetName="InnerPath">

 

 

 

<Setter.Value>

 

 

 

<LinearGradientBrush EndPoint="0.500008,0" StartPoint="0.500008,1.00006">

 

 

 

<GradientStop Color="#FFE3F6FF" Offset="0"/>

 

 

 

<GradientStop Color="#FFBFEAFF" Offset="1"/>

 

 

 

</LinearGradientBrush>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

</Trigger>

 

 

 

<Trigger Property="IsSelected" Value="False">

 

 

 

<Setter Property="Stroke" TargetName="OuterPath">

 

 

 

<Setter.Value>

 

 

 

<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

 

 

 

<GradientStop Color="#4000BCFF" Offset="0"/>

 

 

 

<GradientStop Color="#6600BCFF" Offset="1"/>

 

 

 

</LinearGradientBrush>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

<Setter Property="Stroke" TargetName="OuterFill">

 

 

 

<Setter.Value>

 

 

 

<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

 

 

 

<GradientStop Color="#4000BCFF" Offset="0"/>

 

 

 

<GradientStop Color="#6600BCFF" Offset="1"/>

 

 

 

</LinearGradientBrush>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

<Setter Property="Background" TargetName="InnerFill" Value="Transparent"/>

 

 

 

<Setter Property="Fill" TargetName="InnerPath" Value="White"/>

 

 

 

<Setter Property="Margin" TargetName="wrapper" Value="0,0,-10,-2"/>

 

 

 

<Setter Property="Foreground" TargetName="HeaderElement" Value="Blue"/>

 

 

 

<Setter Property="FontWeight" TargetName="HeaderElement" Value="Normal"/>

 

 

 

<Setter Property="FontSize" TargetName="HeaderElement" Value="16"/>

 

 

 

<Setter Property="Margin" TargetName="HeaderElement" Value="2"/>

 

 

 

<Setter Property="Cursor" Value="Hand"/>

 

 

 

</Trigger>

 

 

 

 

<Trigger Property="IsSelected" Value="True">

 

 

 

<Setter Property="Stroke" TargetName="OuterPath">

 

 

 

<Setter.Value>

 

 

 

<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

 

 

 

<GradientStop Color="#4000BCFF" Offset="0"/>

 

 

 

<GradientStop Color="#6600BCFF" Offset="1"/>

 

 

 

</LinearGradientBrush>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

<Setter Property="Stroke" TargetName="OuterFill">

 

 

 

<Setter.Value>

 

 

 

<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

 

 

 

<GradientStop Color="#4000BCFF" Offset="0"/>

 

 

 

<GradientStop Color="#6600BCFF" Offset="1"/>

 

 

 

</LinearGradientBrush>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

<Setter Property="Background" TargetName="InnerFill" Value="Transparent"/>

 

 

 

<Setter Property="Fill" TargetName="InnerPath" Value="White"/>

 

 

 

<Setter Property="Margin" TargetName="wrapper" Value="0,0,-10,-2"/>

 

 

 

<Setter Property="Foreground" TargetName="HeaderElement" Value="#262626"/>

 

 

 

<Setter Property="FontWeight" TargetName="HeaderElement" Value="Bold"/>

 

 

 

<Setter Property="FontSize" TargetName="HeaderElement" Value="16"/>

 

 

 

<Setter Property="Margin" TargetName="HeaderElement" Value="2"/>

 

 

 

</Trigger>

 

 

 

<Trigger Property="IsEnabled" Value="False">

 

 

 

<Setter Property="Opacity" TargetName="HeaderElement" Value="0.5"/>

 

 

 

</Trigger>

 

 

 

</ControlTemplate.Triggers>

 

Dimitrina
Telerik team
 answered on 15 Apr 2010
1 answer
97 views
Hello All,

   In the private bool Telerik.Windows.Controls.GridView.GridViewDataControl.Move(FocusNavigationDirection navigationDirection) method, there is an unchecked condition in the FocusNavigationDirection.Next and Previous switch condition that throws a NullRefereceException.  Below is the code snippet:

      switch (navigationDirection)  
      {  
        case FocusNavigationDirection.Next:  
        case FocusNavigationDirection.Previous:  
          if (!this.CurrentCell.IsInEditMode)  
          { //...  
 

I know its a bug because just below that is the proper form of the condition that checks this.CurrentCell for null:
        case FocusNavigationDirection.Left:  
        case FocusNavigationDirection.Right:  
        case FocusNavigationDirection.Up:  
        case FocusNavigationDirection.Down:  
          currentCellContainer = this.OnArrowKeyDown(this.CurrentCell, navigationDirection);  
          if ((this.CurrentCell != null) && this.CurrentCell.IsInEditMode)  
          { //...  
 

- Rashad Rivera
  omegusprime.com
Vlad
Telerik team
 answered on 15 Apr 2010
6 answers
337 views
Default setting for the EditTriggers in the DataGrid is "Mouse DoubleClick". However I want to be able to edit the cells if either of the following events happen:

1. Enter Key Press
2. Mouse DoubleClick
3. F2 Key Press

Can you tell me how to do this? I didn't find anything in the documentation regarding this.
Nedyalko Nikolov
Telerik team
 answered on 14 Apr 2010
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
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?