Telerik Forums
UI for WPF Forum
2 answers
97 views
Hi,

I am trying to  use the DatePicker control but I've not found a way yet to fix the following problem

1.  I need to show a calendar control that only shows months (this bits easy)
2.  I have a collection of dates.  I wish to highlight the month on the datepicker if that month appears in the collection of dates I have.

So it should be fairly straightforward.  A calendar that only shows months and bound to a list of dates.  If I have 01/01/14 in the list then Jan should be highlighted along with any other months that appear in the list (so maybe Jan, Mar, May would all be highlighted for 2014).

Thanks

Craig
Top achievements
Rank 1
 answered on 24 Jun 2014
7 answers
745 views
Hi,

I am comparing Telerik RadGridView with Standard dataGrid. My requirement is to create grid with custom columns. Columns cellTemplate is a View itself and column sortmemberPath is set to property to display. This property is an object which could be anything (string/int/double/list etc. ) . With DataGrid sort was working but with Telerik RadGridView it's not working (the binding etc. is still the same.). Following is an example of one of the coulmn which is being templated as per the item.

Telerik.Windows.Controls.GridViewDataColumn columnTemplate = new Telerik.Windows.Controls.GridViewDataColumn();
columnTemplate.IsSortable = true;
columnTemplate.IsCustomSortingEnabled = true;
columnTemplate.MinWidth = (item as INode).Builder.Header.Width;

columnTemplate.Header = item;

columnTemplate.Width = (item as INode).Builder.Header.Width + 10;
if (!columnGroup.Equals(string.Empty))
{
columnTemplate.ColumnGroupName = columnGroup;
}

if (item is IntegerPropertyNodeViewModel)
{
var headerName = (item as IntegerPropertyNodeViewModel).PropertyName.Substring((item as IntegerPropertyNodeViewModel).PropertyName.LastIndexOf(' ') + 1);
columnTemplate.Header = headerName;
columnTemplate.UniqueName = headerName;

var text = new FrameworkElementFactory(typeof(IntegerPropertyNodeView));

if (0 != path.Length)
{
System.Windows.Data.Binding bind = new System.Windows.Data.Binding(path);
text.SetBinding(IntegerPropertyNodeView.DataContextProperty, bind);

columnTemplate.SortMemberPath = path + ".Target";
}
SdmGridControlViewColumnGenerator.SetName(columnTemplate, "IntegerProperty");
columnTemplate.CellTemplate = new DataTemplate();
columnTemplate.CellTemplate.VisualTree = text;
columnTemplate.CellTemplate.Seal();
dataGrid.Columns.Add(columnTemplate);
}

Could you please help me in sorting issue with Telerik RadGridView.

Thanks and Regards,
Sonia
Dimitrina
Telerik team
 answered on 24 Jun 2014
4 answers
145 views
Hello,
I want to print/export the contents of a RadGridView. However, I want to retain the cell styles (or at least format it somewhat similar), especially for user-defined columns. For example, the number of decimal digits or the localized enum value should be retained.

When I use the ElementExporting event and check for e.Element == ExportElement.Cell,
the e.Context value points to the Column, not to the concrete cell. Is there any way to get the concrete GridViewCell? Or at least get the bound item?

Alex

 
Dimitrina
Telerik team
 answered on 24 Jun 2014
2 answers
94 views
Hi All,

We are currently writing a proposal and were wondering whether RadGridView supports the following functionality. We have a value that we want displayed in a cell within a grid, this value can be updated in three ways (a calculation will convert the value into the displayed value). To do this, we were hoping that the grid would let us click on the cell and display a popup overlay with three textboxes (and three labels), depending on which value the user modifies, the others are updated. The user interface would be something similar to what happens in teampulse:

https://www.dropbox.com/s/1082ugip3i2on4m/Screenshot%202014-06-20%2014.20.41.png

Is this remotely possible?

Thanks,
Daryl


Nick
Telerik team
 answered on 24 Jun 2014
3 answers
131 views
Based on the example on http://www.telerik.com/help/wpf/styling-apperance-themes-runtime.html

When using styles based on Telerik ones (these styles are merged with the app resources every time the theme changes):

Content of MyStyles.xaml
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
    <Style TargetType="{x:Type telerik:RadButton}" x:Key="BT" BasedOn="{StaticResource RadButtonStyle}">
        <Setter Property="Height" Value="40"/>
    </Style>
 
    <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
        <Setter Property="Margin" Value="5"/>
        <Setter Property="Height" Value="30"/>
    </Style>
 
 
</ResourceDictionary>

and code to change the theme 

private void Windows7_Click(object sender, RoutedEventArgs e)
        {
            Application.Current.Resources.MergedDictionaries.Clear();
            Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary()
            {
                Source = new Uri("/Telerik.Windows.Themes.Windows7;component/Themes/System.Windows.xaml", UriKind.RelativeOrAbsolute)
            });
            Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary()
            {
                Source = new Uri("/Telerik.Windows.Themes.Windows7;component/Themes/Telerik.Windows.Controls.xaml", UriKind.RelativeOrAbsolute)
            });
            Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary()
            {
                Source = new Uri("/Telerik.Windows.Themes.Windows7;component/Themes/Telerik.Windows.Controls.Input.xaml", UriKind.RelativeOrAbsolute)
            });
 
            Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary()
            {
                Source = new Uri("MyStyles.xaml", UriKind.RelativeOrAbsolute)
            });
 
 
        }

Main form XAML
<Window x:Class="WpfThemes.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"
                Title="MainWindow" Width="800" Height="600">
    <Window.Resources>
        
    </Window.Resources>
    <Grid x:Name="LayoutRoot" Background="White" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
 
        <StackPanel Orientation="Horizontal" Background="#FFE5E5E5" HorizontalAlignment="Stretch">
            <telerik:RadButton Content="Office Black" VerticalAlignment="Center" Width="110"  Margin="10" Click="OfficeBlack_Click" />
            <telerik:RadButton Content="Windows8" VerticalAlignment="Center" Width="110" Margin="10" Click="Windows8_Click" />
            <telerik:RadButton Content="Windows 7" VerticalAlignment="Center" Width="110"  Margin="10" Click="Windows7_Click" />
        </StackPanel>
 
        <StackPanel Orientation="Vertical" Grid.Row="1" Margin="20" HorizontalAlignment="Left">
            <telerik:RadComboBox Width="230" Margin="10">
                <telerik:RadComboBoxItem Content="Item 1" />
                <telerik:RadComboBoxItem Content="Item 2" />
                <telerik:RadComboBoxItem Content="Item 3" />
                <telerik:RadComboBoxItem Content="Item 4" />
                <telerik:RadComboBoxItem Content="Item 5" />
            </telerik:RadComboBox>
 
            <telerik:RadDateTimePicker Width="230" Margin="10" IsDropDownOpen="True" />
             
            <StackPanel Orientation="Horizontal">
                <telerik:RadButton>Button with Type Style</telerik:RadButton>
                <telerik:RadButton Style="{StaticResource BT}">Button With Keyed Style</telerik:RadButton>
            </StackPanel>
        </StackPanel>
    </Grid>
</Window>


Why the first style is corrected applied when the theme changes and the second one (Keyed) not?

 What is the reason to this behavior and is there an workaround ?


 



Audreyn Justus
Top achievements
Rank 1
 answered on 24 Jun 2014
5 answers
117 views
Is there a way of doing this?  I have a requirement of allowing the user to increase/decrease the major tick lines (to achieve zooming in/out)
Polya
Telerik team
 answered on 24 Jun 2014
2 answers
102 views
Hello

In the RibbonView group at the Q3-2013 release history, there is a line saying that the possibility to keep the Backstage open when Escape key is pressed was added:
http://www.telerik.com/support/whats-new/wpf/release-history/q3-2013

But I didn't find any property to do so, and even when I looked for the RibbonView changes here: http://www.telerik.com/help/wpf/radribbonview-changes.html
I couldn't find any information about the Q3-2013 release.

What I am looking for is the possibility to not close the backstage when I hit Escape. The reason is that I have a listbox, and my listboxitems have a textbox allowing the user to change the item's name, and the only way possible for the user to cancel the operation is by pressing Escape.

Maybe I didn't find the correct property or missed something else.

Thanks
Maurício
Top achievements
Rank 1
 answered on 24 Jun 2014
2 answers
81 views
How to limit the number of drops. I am using drag Drop between 2 RadListBoxes. Do you have any similar sample?
How to drop after user approves?
 
Kalin
Telerik team
 answered on 24 Jun 2014
1 answer
200 views
In my WPF app, I am trying to improve the user experience of zooming in RadImageEditor.  The default experience of tedious zooming and scrolling is getting complaints from users and I agree. I'd very much like to support an experience such as the zoom feature in Microsoft Expression Blend, where the zoom center is always relative to the hovering mouse position.

I happened to notice the AllowMouseWheelScaling property, which sounded interesting but I can find no description of what it is supposed to do. Only a variety of terse API docs which are of no help.   I tried setting that property on my RadImageEditor to true, but didn't see any change in the mouse wheel behavior (still scrolls)

I'd like to know what this property is and how to use it, but also how I could possibly have found that out. Am I missing some resource with info such as this?  


































































































































Todor
Telerik team
 answered on 24 Jun 2014
5 answers
237 views
I've spent the last day tracking down a weird bug. I copy/pasted an existing PropertyDefinition into a new View but it just did not work. The values were not displaying. I finally tracked it down.

My definitions are:

<!-- This one works  -->
<PropertyGrid:PropertyDefinition Binding="{Binding Stock.Name}" GroupName="Stock" DisplayName="Name" OrderIndex="9" />
<!-- This one does not show any text, even the FallbackValue when I intentionally mistype the binding path  -->
<PropertyGrid:PropertyDefinition Binding="{Binding Stock.Name}" GroupName="Stock" DisplayName="Name" OrderIndex="10">
  <PropertyGrid:PropertyDefinition.EditorTemplate>
    <DataTemplate>
      <TextBlock Text="{Binding Stock.Name, TargetNullValue='The value is null', FallbackValue='Problem getting text'}" />
    </DataTemplate>
  </PropertyGrid:PropertyDefinition.EditorTemplate>
</PropertyGrid:PropertyDefinition>

As you can see in the comments the controls are basically identical, the only difference is the 2nd one has a DataTemplate with a TextBlock in it. This TextBlock is completely empty.

I finally found the one difference between my views that fixed the problem.

<UserControl.Resources>
  <Style TargetType="Controls2:RadPropertyGrid">
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
</UserControl.Resources>

I'm just wondering why this matters. Is it a bug? Did I leave something important out and this triggers it? Adding the above property directly to the control does not fix it - only when we use a Style.

Note that the controls in the DataTemplate will render, e.g. if I set Background="Red", but the Text will not display even if it is hard coded to a string. 
Dimitrina
Telerik team
 answered on 24 Jun 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?