Telerik Forums
UI for WPF Forum
3 answers
366 views
Hello Telerik. I've encountered a problem while styling the GridView component. As you can see from the attached image, there are some black borders around the header cells and around the row content as well, that i want to remove. Hope you can help me with this. Thank you  
Kalin Milanov
Telerik team
 answered on 09 Jun 2010
1 answer
80 views
Hello,

I try customize control in Blend 4. But it doen't allow edit styles(Only suggests to create the empty)
Can u share dictionary with default RadGridView styles?
Vlad
Telerik team
 answered on 08 Jun 2010
2 answers
268 views
Hello,

I've already created a topic in this forum, and I need your help once again.
I work with the same configuration (it's the same application) : Telerik + MS Prism
Link : Close tabs - RadTabControl + Prism

I have a problem with the Binding and RadTabControl.
I have a button to add a RadTabItem in my RadTabControl, and the content of the RadTabItem work with a ContentTemplate.
The content is a form with some TextBox and each textbox has a Binding with an Object in my Model.

CODE :
So, here the XAML code of my RadTabControl :
<telerik:RadTabControl Name="RadTabControlAddress" SelectionChanged="RadTabControlAddress_SelectionChanged"
                    <telerik:RadTabControl.ItemContainerStyle> 
                        <Style TargetType="{x:Type telerik:RadTabItem}"
                            <Setter Property="ContentTemplate"
                                <Setter.Value> 
                                    <DataTemplate> 
                                        <Grid Name="Grid"
                                            <Grid.ColumnDefinitions> 
                                                <ColumnDefinition Width="100" /> 
                                                <ColumnDefinition Width="*"/> 
                                            </Grid.ColumnDefinitions> 
                                            <Grid.RowDefinitions> 
                                                <RowDefinition /> 
                                            </Grid.RowDefinitions> 
                                            <TextBlock Text="{Loc address1}" Grid.Row="0" Grid.Column="0"></TextBlock> 
                                            <TextBox Grid.Row="0"  Grid.Column="1" Text="{Binding Adresse.Adresse1 }" Height="30" Margin="5"></TextBox> 
                                        </Grid> 
                                    </DataTemplate> 
                                </Setter.Value> 
                            </Setter> 
                        </Style> 
                    </telerik:RadTabControl.ItemContainerStyle> 
                 
                </telerik:RadTabControl> 
(I deleted some field for a short version)

I have a simple RadButton with this event :
private void AddAddressTab() 
        { 
            _model.AddAddress(); 
            RadTabItem itemToAdd = new RadTabItem() 
            { 
                Header = "New Tab" 
            }; 
            RadTabControlAddress.Items.Add(itemToAdd); 
            RadTabControlAddress.SelectedIndex = RadTabControlAddress.Items.Count - 1; 
        } 

The constructor in my XAML.cs is :
public AjouterView(AjouterViewModel model) 
        { 
            InitializeComponent(); 
            // Sauvegarde du model dans un attribut de la classe. 
            _model = model; 
            // On se sert de notre model en tant que DataContext. 
            this.DataContext = model; 
 
            //AddAddressTab(); 
        } 

In my Model I have two attribute :
private IAdresse _adresse = null
        public IAdresse Adresse 
        { 
            get { return _adresse; } 
            set 
            { 
                _adresse = value; 
                OnPropertyChanged("Adresse"); 
            } 
        }
My Model implement INotifyPropertyChanged - (And sorry for french name...)

The AddAddress() Method (in the model) :
public void AddAddress() 
        { 
            IAdresse address = new Adresse("Just a test"); 
            ListAdresse.Add(address); 
            Adresse = address; 
        } 

I not include the system to change the address when we select an other Tab.

PROBLEM :
The first time we add an address (add a Tab in the TabControl), the binding doesn't work. I need to add two address for work. I don't find why ! The binding work only if I click the Button (to add an other address) if there is already a Tab in the TabControl.

ATTACHED FILE :
You can download a demo here : Download

If you need more informations, please tell me.
Thank you in advance for your answer.

Regards,
G.B.

[EDIT] : Nobody shall have the beginning of solution ? I don't find how to fix this problem !
George Bill
Top achievements
Rank 1
 answered on 08 Jun 2010
3 answers
162 views
Hi,
I want to cancel drag operation on right click. i dragged item by pressing left click now i press right click(Simultaneously) and want to cancel drag operation.  This is same behavior as window expolere.

Thanks
Bala
Kiril Stanoev
Telerik team
 answered on 08 Jun 2010
7 answers
295 views
When I try to change the point size on a scatter plot, it doesn't increase in size, it's as if the container is fixed at a size and the point get clipped (so when I draw a circle point of point size 20, i see only a quarter of the circle appear on the graph).

here is my code i'm using to adjust the size:

DataSeries series = new DataSeries();
            ScatterSeriesDefinition l = new ScatterSeriesDefinition();
            l.Appearance.Fill = Brushes.DeepPink;
            l.Appearance.Stroke = Brushes.Black;
            l.PointSize = 20;
            series.Definition = l;

Appreciate your thoughts,
Nelson



James DAmour
Top achievements
Rank 1
 answered on 08 Jun 2010
3 answers
128 views
Hi,

I have a grid that is bound to a DataTable. The structure of the DataTable varies at runtime so I cannot set the columns at design time (AutoGenerateColumns is set to true). When a column of the DataTable is of type System.Byte[] the grid shows "System.Byte[]" and I would like it to show an image instead. I am guessing I should be using a DataTemplate for this type but I am unsure of how to do this with the GridView, can you please help or point me to the relevant resource?

Cheers,
Jose
Yavor Georgiev
Telerik team
 answered on 07 Jun 2010
1 answer
109 views
Hi All

I am using the WPF 2010 Q1 controls and as per the documentation here: http://www.telerik.com/help/wpf/gridview-events-validation.html

I am calling the rowisvalidating event and on a condition setting e.IsValid = false; But even when this is set to false, the rowisvalidated event is still fired. I thought that this would not be the case.

Nick
Nedyalko Nikolov
Telerik team
 answered on 07 Jun 2010
2 answers
306 views

Hi,

I'm using RadControls for WPF 2010 Q1 (V2010.1.528.35). I have to customize the RadGridView according the following points :

  • the grid needs to define a first column that is a checkbox column allowing to select/deselect rows
  • this column is databound (2way) to a boolean property (IsSelected) of an object.
  • the column must be always in edit mode. The user needs to be allowed to check directly the checkboxes without a previous click/double click that put the cells in editmode.

The first 2 points are done without any problem. For the third, I've tried differents ways to achieve this goal but without success :/

Can someone provide me a little help on this point ?

Greets,

Thomas

Thomas
Top achievements
Rank 1
 answered on 07 Jun 2010
1 answer
225 views
I really need some help on this!! :)

I'm unable to get rid of the background of the mouseovervisual. I've followed the example provided in the project here with no luck http://www.telerik.com/community/forums/wpf/panelbar/turn-off-mouse-over-effect-in-item-panel.aspx.

The problem is that when the panels are expanded, the mouseovervisual effect of the default orange background still appears on hover, even when applying the PanelBarItemSecondLevelTemplateStyle to the RadPanelBarItem.

The xaml:

    <Grid x:Name="MainContent" Margin="0,2,2,0">
        <Border BorderBrush="#FF336687" BorderThickness="1" CornerRadius="4" Margin="0" Width="Auto" Height="Auto">

            <telerikNavigation:RadPanelBar x:Name="PresentationPanel" Template="{DynamicResource PresentationPanelBar}" Background="Transparent"
                                           dragDrop:RadDragAndDropManager.AllowDrop="True" Orientation="Vertical" ExpandMode="Multiple">
                <telerikNavigation:RadPanelBarItem Name="DetailsPanel" IsExpanded="{Binding IsDetailsExpanded}" Template="{DynamicResource PanelBarItemSecondLevelTemplateStyle}">
                    <telerikNavigation:RadPanelBarItem.Header>
                        <ContentControl Cursor="Hand">
                            <TextBlock Text="Details" Foreground="#FFFFFF" Margin="5 4 5 5"/>
                        </ContentControl>
                    </telerikNavigation:RadPanelBarItem.Header>
                    <local:DraggableListBox x:Name="DetailDraggableListBox" ItemsSource="{Binding AvailableDetails}"
                                            ItemTemplate="{StaticResource Test}"
                                            ItemsPanel="{StaticResource DefaultWorkspacePanelTemplate}"
                                            Background="Transparent"
                                            BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                    </local:DraggableListBox>
                </telerikNavigation:RadPanelBarItem>

                <telerikNavigation:RadPanelBarItem Name="TopicsPanel" IsExpanded="{Binding IsTopicsExpanded}" Template="{DynamicResource PanelBarItemSecondLevelTemplateStyle}">
                    <telerikNavigation:RadPanelBarItem.Header>
                        <ContentControl Cursor="Hand">
                            <TextBlock Text="Topics" Foreground="#FFFFFF" Name="txtTopicsHeader" Margin="5 4 5 5" />
                        </ContentControl>
                    </telerikNavigation:RadPanelBarItem.Header>
                    <local:DraggableListBox ItemsSource="{Binding TopicsForSelectedDetail}"
                                            ItemTemplate="{StaticResource Test}"
                                            ItemsPanel="{StaticResource DefaultWorkspacePanelTemplate}"
                                            Background="Transparent"
                                            BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                    </local:DraggableListBox>
                </telerikNavigation:RadPanelBarItem>
                <telerikNavigation:RadPanelBarItem Name="ContentPanel" IsExpanded="{Binding IsContentExpanded}" Template="{DynamicResource PanelBarItemSecondLevelTemplateStyle}">
                    <telerikNavigation:RadPanelBarItem.Header>
                        <ContentControl Cursor="Hand">
                            <TextBlock Text="Content" Foreground="#FFFFFF" Margin="5 4 5 5"/>
                        </ContentControl>
                    </telerikNavigation:RadPanelBarItem.Header>
                    <local:DraggableListBox ItemsSource="{Binding ContentForSelectedTopic}"
                                            ItemTemplate="{StaticResource Test}"
                                            ItemsPanel="{StaticResource DefaultWorkspacePanelTemplate}"
                                            Background="Transparent"
                                            BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                    </local:DraggableListBox>

                </telerikNavigation:RadPanelBarItem>
            </telerikNavigation:RadPanelBar>
        </Border>
    </Grid>

...and here's what I added to our Style.xaml resources file (per the example in the link above):

<Style TargetType="telerikNavigation:RadPanelBarItem" x:Key="PanelBarItemSecondLevelTemplateStyle">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikNavigation:RadPanelBarItem">

                    <Grid x:Name="RootElement">

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <Grid x:Name="HeaderRow" Background="Transparent">

                            <!-- Hover -->
                            <!--<Border x:Name="MouseOverVisual" Opacity="0"
           CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}"
           BorderBrush="{StaticResource ControlSubItem_OuterBorder_MouseOver}"
           BorderThickness="{StaticResource ControlSubItem_OuterBorderThickness}">
          <Border BorderBrush="{StaticResource ControlSubItem_InnerBorder_MouseOver}"
            CornerRadius="{StaticResource ControlSubItem_InnerCornerRadius}"
            BorderThickness="{StaticResource ControlSubItem_InnerBorderThickness}"
            Background="{StaticResource ControlSubItem_Background_MouseOver}" />
         </Border>-->

                            <!-- Select -->
                            <!--<Border x:Name="SelectionVisual" Opacity="0"
           CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}"
           BorderBrush="{StaticResource ControlSubItem_OuterBorder_Selected}"
           BorderThickness="{StaticResource ControlSubItem_OuterBorderThickness}">
          <Border BorderBrush="{StaticResource ControlSubItem_InnerBorder_Selected}"
            CornerRadius="{StaticResource ControlSubItem_InnerCornerRadius}"
            BorderThickness="{StaticResource ControlSubItem_InnerBorderThickness}"
            Background="{StaticResource ControlSubItem_Background_Selected}" />
         </Border>-->

                            <!-- Disabled -->
                            <Border x:Name="DisabledVisual" Opacity="0"
          BorderBrush="{StaticResource ControlOuterBorder_Disabled}"
          CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}"
          BorderThickness="{StaticResource ControlSubItem_OuterBorderThickness}">
                                <Border
           BorderBrush="{StaticResource ControlInnerBorder_Disabled}"
           CornerRadius="{StaticResource ControlSubItem_InnerCornerRadius}"
           BorderThickness="{StaticResource ControlSubItem_InnerBorderThickness}"
           Background="{StaticResource ControlBackground_Disabled}" />
                            </Border>

                            <!-- Header -->

                            <ContentControl x:Name="Header" Margin="{TemplateBinding Padding}"
          Content="{TemplateBinding Header}"
          ContentTemplate="{TemplateBinding HeaderTemplate}"
          ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
          Foreground="{TemplateBinding Foreground}"
          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />

                            <!-- Focus -->
                            <Rectangle x:Name="FocusVisual" Visibility="Collapsed"
          Stroke="{StaticResource FocusBrushBlack}"
          StrokeThickness="1" StrokeDashArray="1 2"
          IsHitTestVisible="False" RadiusX="2" RadiusY="2" />

                        </Grid>

                        <!-- Content -->
                        <Grid Visibility="Collapsed" Grid.Row="1" x:Name="ItemsContainer">
                            <telerikPrimitives:LayoutTransformControl
          x:Name="transformationRoot">
                                <ItemsPresenter />
                            </telerikPrimitives:LayoutTransformControl>
                        </Grid>

                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <!--<Setter Property="Opacity" Value="1" TargetName="SelectionVisual" />-->
                        </Trigger>

                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="Visibility" Value="Visible"
          TargetName="FocusVisual" />
                        </Trigger>

                        <Trigger Property="IsExpanded" Value="True">
                            <Setter Property="Visibility" Value="Visible"
          TargetName="ItemsContainer" />
                        </Trigger>

                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="1" TargetName="DisabledVisual" />
                        </Trigger>
                        <!--<EventTrigger RoutedEvent="UIElement.MouseEnter" SourceName="HeaderRow">
        <BeginStoryboard>
         <Storyboard>
          <DoubleAnimation Storyboard.TargetProperty="Opacity"
            Storyboard.TargetName="MouseOverVisual" To="1.0"
            Duration="0:0:0.2" />
         </Storyboard>
        </BeginStoryboard>
       </EventTrigger>
       <EventTrigger RoutedEvent="UIElement.MouseLeave" SourceName="HeaderRow">
        <BeginStoryboard>
         <Storyboard>
          <DoubleAnimation Storyboard.TargetProperty="Opacity"
            Storyboard.TargetName="MouseOverVisual" To="0"
            Duration="0:0:0.2" />
         </Storyboard>
        </BeginStoryboard>
       </EventTrigger>-->
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

Dimitrina
Telerik team
 answered on 07 Jun 2010
1 answer
74 views
I am currently testing Telerik, and testing for the charting at the moment, however I seem to be unable to render 3d charts.

Assume I have a XAML document, with one RadChart element, named w_Chart. The following works as expected:
public MainWindow () 
        { 
            InitializeComponent (); 
 
            SetupChart (); 
        } 
 
        public void SetupChart () 
        { 
            SeriesMapping sm1 = new SeriesMapping () { SeriesDefinition = new AreaSeriesDefinition () }; 
            ItemMapping im1 = new ItemMapping () { DataPointMember = DataPointMember.YValue }; 
            sm1.ItemMappings.Add (im1); 
 
            w_Chart.SeriesMappings.Add (sm1); 
 
            w_Chart.ItemsSource = Enumerable.Range (20, 5); 
        } 

However, if I change AreaSeriesDefinition to Area3DSeriesDefinition, it crashes (IntelliTrace picks up a lot of null reference exceptions). The same is true of Bar -> Bar3d.

What is required to get 3d charting to work?

[Edit: ] It also crashes when I attach a camera.
Nikolay
Telerik team
 answered on 07 Jun 2010
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?