Telerik Forums
UI for WPF Forum
4 answers
111 views
Hi,


Ii created a Little Project with a custom Toolbox. So far so fine, but I can't drop a Shape in a container. It is possible
to drop the shape onto the diagram, but not on the Container. After I dropped the shape onto the diagram, I can crop
this shape onto the Container.


where is the Problem?

thanks a lot
best Regards
Rene
ITA
Top achievements
Rank 1
 answered on 17 May 2014
2 answers
111 views
Hello everyone.

I am playing around with MVVM (leveraging Prism and Unity), but I am somewhat stuck on how to bind my modules to a PanelBar properly. What I want to do is set the ItemHeader text to the name of whatever module I am loading (at design time, I don't know how many modules will be loaded), and then have the Items (Views) be displayed under that.  Graphically it would look something like this:

################    PanelBar    ############### 
================Module 1 Text=============== //ItemHeader
---------------------------- View     1 Text--------------------------- //Item
---------------------------- View     2 Text--------------------------- //Item
---------------------------- View     3 Text--------------------------- //Item
================Module 3 Text=============== //ItemHeader
---------------------------- View     1 Text--------------------------- //Item
---------------------------- View     2 Text--------------------------- //Item
########################################## 

I know (basically) how to get 'View X Text' to display through the use of a ViewModel, but I am not sure about getting the ItemHeader set properly.  Any help that you can provide would be greatly appreciated!

Thanks.

Doug
Top achievements
Rank 1
 answered on 17 May 2014
7 answers
180 views
Hi, I have two lines from the wrap panel and from the ribbon view which do not seem to be effected by border / brush was wondering how I can get rid of them.
xaml -

<telerik:RadRibbonView TitleBarVisibility="Collapsed" ApplicationButtonVisibility="Collapsed" QuickAccessToolBarPosition="NotHosted" Height="80" Background="White">
            <telerik:RadRibbonView.Resources>
                <telerik:FontFamiliesProvider x:Key="FontFamiliesProvider"/>
            </telerik:RadRibbonView.Resources>
            <telerik:RadOrderedWrapPanel>
                     .....................
                     .....................
            </telerik:RadOrderedWrapPanel>
</telerik:RadRibbonView>
Kiril Vandov
Telerik team
 answered on 16 May 2014
8 answers
102 views
Hi Everyone,

I am using 2013.2.805.45  telerik. When i add assertion on RadGridView cell control i am getting wrong hierarchy i.e cell control--> under pane -->Desktop as shown in attached image.
If we create same sample application using 2013.2.819.40 telerik it is working fine.
Please provide solution to it.  

Source Code:

<Window x:Class="RadControlsWpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:my="clr-namespace:RadControlsWpfApp1"
        Title="MainWindow" Height="700" Width="700">
    <Window.Resources>
        <my:MyViewModel x:Key="MyViewModel"/>
    </Window.Resources>
    <Grid DataContext="{StaticResource MyViewModel}">

        <telerik:RadGridView Grid.Row="0" 
                             Name="clubsGrid" 
                             ItemsSource="{Binding Clubs}"
                             AutoGenerateColumns="False"
                             Margin="5">
            <telerik:RadGridView.Columns>
                <telerik:GridViewSelectColumn />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"
                                            Header="Est." 
                                            DataFormatString="{}{0:yyyy}"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}" 
                                            Header="Stadium" 
                                            DataFormatString="{}{0:N0}"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

    </Grid>
</Window>


Regards,
Rajendar.
Maya
Telerik team
 answered on 16 May 2014
7 answers
140 views
We're using the RadRibbonView and are populating it's content dynamically using models for tabs, groups, and buttons. In the constructor of our window we initialize some default tab for the ribbon and make it selected. Then after the window has been loaded we add some more ribbon tabs based off a certain configuration. By itself this works just fine. However we've now decided to bind the RadRibbonView.IsMinimized property so that we can change it in code (get/set from config class). This also works fine by itself, but when you combine these two usage behaviors the RadRibbonView kind of breaks on initial start. You can download a sample project that demonstrates the problem here: https://dl.dropboxusercontent.com/u/22608/RibbonViewMinimized.zip

It seems to be related to the tab selection. In the constructor of the MainWindow if you remove the line that sets the initially selected tab then the problem goes away. Otherwise the SelectedTabContent component of the RadRibbonView seems to become detached from the window (if you move the window around the screen after it initially loads you'll see what I mean). Also, after the window is displayed and the ribbon view is broken, toggling IsMinizmied (double-clicking on a tab header) fixes the issue.

There's things we can do to easily work around this, but I just wanted to present it as a bug and see if you had any feedback.

Thanks!
Martin Ivanov
Telerik team
 answered on 16 May 2014
3 answers
146 views
I'm using a RadScheduleView with some combobox dropdowns to set filter options. Here's how I set this up (excess code has been removed):

<UserControl x:Class="CalendarsContainer"
    <Grid x:Name="ScheduleGrid">
        <Grid.DataContext>
            <viewModels:CalendarViewModel />
        </Grid.DataContext>
        <telerik:RadComboBox Grid.Row="0" SelectedValue="{Binding TaskFilter, Mode=TwoWay}"/>
        <telerik:RadScheduleView Grid.Row="1" AppointmentsSource="{Binding Appointments}">
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:MonthViewDefinition AppointmentFilter="{Binding AppointmentFilter}" />
            </telerik:RadScheduleView.ViewDefinitions>
        </telerik:RadScheduleView>
    </Grid>
</UserControl>


When I use this, I get a binding error after it's first initialized:

Get System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=AppointmentFilter; DataItem='CalendarViewModel' (HashCode=6511533); target element is 'MonthViewDefinition' (HashCode=63187382); target property is 'AppointmentFilter' (type 'Predicate`1')

But other than that, everything works as I expect. My appointments are displayed as per my filter settings. As I change my dropdown, the AppointmentFilter gets called for every appointment and the visible appointments are changed to match the filter.

But, if I remove setting of the DataContext from the xaml:

<UserControl x:Class="CalendarsContainer"
    <Grid x:Name="ScheduleGrid">
        <telerik:RadComboBox Grid.Row="0" SelectedValue="{Binding TaskFilter, Mode=TwoWay}"/>
        <telerik:RadScheduleView Grid.Row="1" AppointmentsSource="{Binding Appointments}">
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:MonthViewDefinition AppointmentFilter="{Binding AppointmentFilter}" />
            </telerik:RadScheduleView.ViewDefinitions>
        </telerik:RadScheduleView>
    </Grid>
</UserControl>

and move it to the code behind:

public CalendarsContainer()
{
    InitializeComponent();
    ScheduleGrid.DataContext = new CalendarViewModel();
}

Now, instead of seeing the "governing FrameworkElement" binding error first, the AppointmentFilter is called for each appointment right away, but then I get the binding error at the end:

System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=AppointmentFilter; DataItem=null; target element is 'MonthViewDefinition' (HashCode=32578312); target property is 'AppointmentFilter' (type 'Predicate`1')

At this point, ALL appointments are displayed, not just the ones that meet the filter requirements.

Even worse is that, as I change the dropdown, the AppointmentFilter gets called for every appointment as I expect, but the visible appointments don't change!! For some reason, the AppointmentFilter is called, but then completely ignored, so all appointments are displayed.

As far as I can tell, the governing FrameworkElement binding is known WPF behavior. What I don't understand is why RadScheduleView doesn't fully recover from this. Since the AppointmentFilter is being called, it seems to partially recover, but then the results of the filtering are ignored.

How can I fix this problem?

Thank you!
George
Telerik team
 answered on 16 May 2014
3 answers
176 views
How do I localize the number format used in RadGridView for double to German culture (1.23 is written in German culture 1,23)?

Take a very simple RadGridView like in the "Getting Started" example for RadGridView (http://www.telerik.com/help/wpf/gridview-getting-started2.html).
On a clean new VS2010 Telerik RadControls project on my German Win7 machine, the header block ("Drag a column header and drop it here ...") is displayed correctly in German ("Ziehen Sie einen Spaltenkopf auf diese Fläche ..."), but cells of columns that represent a  property of type double will not work correctly with German culture. When I enter e.g. the German value half (0,5) it will be interpreted as five (5).

How do I change this?

I already tried

            InitializeComponent();
            LocalizationManager.DefaultCulture = new System.Globalization.CultureInfo("de");

But it does not work...

Mende
Top achievements
Rank 1
 answered on 15 May 2014
2 answers
238 views
I am trying to remove the mouseover row highlight on a RadGridView. I've followed the instructions here, but I put the style in a resource dictionary. Here is the App.xaml:

<ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Styles/GridViewRowStyle.xaml"/>
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

And the RadGridView xaml:

<telerik:RadGridView x:Name="statusGrid" AutoGenerateColumns="False" CanUserDeleteRows="False"
         CanUserInsertRows="False" ItemsSource="{Binding Status}"
         IsReadOnly="True" RowStyle="{DynamicResource GridViewRowStyle}">

This style is completely ignored if it is in an external file. If I do the same procedure as in the stated in the documentation but put it in the MainWindow.xaml file, it works correctly. Why is this?
Karen
Top achievements
Rank 1
 answered on 15 May 2014
1 answer
131 views
Our product use telerik Richtextbox editor  and  currently there is no turkish lira symbol support. Is there a way to add support Turkish Lira symbol to the editor. Thanks anyway.
Missing User
 answered on 15 May 2014
1 answer
80 views
Hi,
I have a radCarousel control with custom items. When I show first time, it shows all items, but when the user move mouse pointer over it, all items disappear from carousel and Output windows show this:

System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=ReflectionSettings.HiddenPercentage; DataItem=null; target element is 'GradientStop' (HashCode=36177439); target property is 'Offset' (type 'Double')
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:(no path); DataItem=null; target element is 'VisualBrush' (HashCode=13645305); target property is 'Visual' (type 'Visual')


This is my XAML Code:
<Window.Resources>
<Style TargetType="{x:Type telerik:CarouselItem}">
<Setter Property="Height" Value="600"/>
<Setter Property="Width" Value="400"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:CarouselItem}">
<Grid>
<Rectangle HorizontalAlignment="Center" VerticalAlignment="Top" Width="300" Height="400" RadiusX="6" RadiusY="6" StrokeThickness="1" Stroke="#FF47587C" Fill="Black"/>
<Rectangle x:Name="recName"  Margin="60,10,60,540"  Stroke="Black" 
                                       RadiusX="6" RadiusY="6" StrokeThickness="1">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Name="X">
<GradientStop Color="#FF020F1F" Offset="0.138"/>
<GradientStop Color="#FF032247" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter IsHitTestVisible="True"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type telerik:CarouselDataRecordPresenter}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:CarouselDataRecordPresenter}">
<StackPanel HorizontalAlignment="Center" TextElement.FontSize="20" TextElement.FontWeight="Bold" TextElement.Foreground="#FFBEC4DE">
<Label Content="{Binding Path=Fullname}" Margin="0,13,0,19" HorizontalAlignment="Center" TextElement.Foreground="#FFBEC4DE"/>
<Image x:Name="imgInternal"  Width="274" Height="270" Stretch="Fill" Source="{Binding Path=PictureFullPath}" />
<Label HorizontalAlignment="Center" Margin="0,10,0,0"  Content="{Binding Path=Position}" TextElement.FontSize="16" TextElement.FontWeight="Normal" TextElement.Foreground="#FFBEC4DE"/>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>

This is radCarousel control: 
<telerik:RadCarousel  x:Name="rcUsers" Background="Black" Height="500" Margin="100,50,100,-120" HorizontalAlignment="Center" VerticalAlignment="Top" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden" SelectionChanged="rcUsers_SelectionChanged" MouseDoubleClick="rcUsers_MouseDoubleClick" />

Thanks in advance,

Carlos De Jesus







Boris
Telerik team
 answered on 15 May 2014
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?