Telerik Forums
UI for WPF Forum
11 answers
506 views
Hi,
I want to change the default behavior of autohide are, 

at present if i mouseover on auto hide area a panel will opens from left to right with a animation, but i want to open the panel on clicking on auto hide area. 

is it possible if yes can you please tell me how can i do that ?
please check the attached png for more information.

Thanks in advance,
Srinivas.
Kalin
Telerik team
 answered on 29 Oct 2014
2 answers
154 views
I want to bind the properties PeriodStart, PeriodEnd, VisiblePeriodStart, and VisiblePeriodEnd to my ViewModel, but it doesn't work like expected. Could this be a bug in the RadTimeline control?

My ViewModel class is called ParentViewModel:

public class ParentViewModel : ViewModelBase
{
    public String Name { get; set; }
    //public DateTime Start { get { return ChildItems.Min(x => x.Start); } }
    //public DateTime End { get { return ChildItems.Max(x => x.End); } }
    public DateTime Start { get { return DateTime.Now; } }
    public DateTime End { get { return DateTime.Now.AddDays(7.0);  } }
    public TimeSpan Duration { get { return End - Start; } }
    public ObservableCollection<TestViewModel> ChildItems { get; private set; }
 
    public ParentViewModel()
    {
        ChildItems = new ObservableCollection<TestViewModel>();
    }
 
    public void AddChilds(IEnumerable<TestViewModel> childs)
    {
        foreach (var x in childs)
        {
            ChildItems.Add(x);
        }
    }
 
    public void FirePropertysChanged()
    {
        OnPropertyChanged("Start");
        OnPropertyChanged("End");
    }
}

I set an instance of this class as the DataContext of a RadTimeline, and bind the PeriodStart and PeriodEnd properties like this:

<Grid x:Name="LayoutRoot">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
 
    <StackPanel Orientation="Horizontal" Margin="2">
        <TextBlock FontWeight="Bold" Text="PeriodStart: " />
        <TextBlock Text="{Binding Start}"/>
    </StackPanel>
 
    <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="2">
        <TextBlock FontWeight="Bold" Text="PeriodEnd: " />
        <TextBlock Text="{Binding End}"/>
    </StackPanel>
 
    <telerik:RadTimeline x:Name="radTimeline1" Grid.Row="2"
                         PeriodStart="{Binding Start}"
                         PeriodEnd="{Binding End}"
                         StartPath="Start"
                         DurationPath="Duration"
                         ItemsSource="{Binding ChildItems}">
        <telerik:RadTimeline.Intervals>
            <telerik:MonthInterval />
            <telerik:WeekInterval />
            <telerik:DayInterval />
            <telerik:HourInterval />
            <telerik:MinuteInterval />
        </telerik:RadTimeline.Intervals>
    </telerik:RadTimeline>
 
</Grid>

The Start and End properties are correctly bound to the TextBlocks and the Dates are displayed. 
However, the RadTimeline's content is blank. 
I tried to raise the OnPropertyChanged events (in the method FirePropertysChanged in my ViewModel), but that doesn't help.
When the date values are hardcoded in XAML, the RadTimeline works. But it doesn't work if bound to a ViewModel.
Could this be a bug?
Ola
Top achievements
Rank 1
 answered on 29 Oct 2014
1 answer
90 views
I'm getting back to a project I started some time ago. I'm generating map tiles with TileMill and placing the tiles in a Postgres database for use in an offline application. Is there any documentation or code sample that shows how to use a database for the RadMap data source? The first solution that comes to mind is hosting a local service that fetches the map tiles from the database. This seems like an overly complicated solution and there should be an easier way.

Thanks,
Petar Mladenov
Telerik team
 answered on 29 Oct 2014
3 answers
139 views
Hi - I'm hoping to use the combo of the RadPropertyGrid with the Dynamic Linq library and generic types as a way to support business rules.  I've already got fully working code with a TextBox and now am hoping to replace that with a  more feature-rich ExpressionEditor.

The idea is this: given an arbitrary class (well known at runtime), create an object of the class and wire it up to the RadPropertyGrid as a "sample".  Then use the RadExpressionEditor (also wired to the same object) to enable the user to craft an expression that can select that item later during some other business processing (again, I have this basically working).

My three questions are as follows:
* the RadPropertyGrid supports DataAnnotations for things like [Browsable(false)] to suppress a given property from the RadPropertyGrid.  I'm wondering if the same DataAnnotation support could be added to the ExpressionEditor Fields list so that fields like "IsChanged" (just part of the IChangeTracking interface) could be suppressed.
* Can the Fields list of the ExpressionEditor be updated to support complex types like the Property Grid (like nested properties)?  (e.g. Class a has three string properties and a fourth property of "ClassB" with three int properties -- I want to see the deep property names for the three ints in the field list).
* Can the Editor itself support intellisense for an enum type?  (e.g. property X if of type Choices which is an enum -- so then I add "X = " using the Expression Editor functions and manually start typing "Choices." in the editor and can see the possible values.

I'm guessing the information I've provided above is enough to answer, but if you would like some code snippets and/or screenshots of this, I can provide those.

Thanks in advance for your consideration.  (and congrats on the Progress thing :)  )

Erik Dahl
​
Dimitrina
Telerik team
 answered on 29 Oct 2014
6 answers
212 views
I started by copying the sample code available for radtimeline themes through the WPF Controls Example app. However, whenever I display the radtimeline using expression_dark theme, you can see that there are white sections of the timeline (shown in the image attachment) when instead I was expecting a shade of grey.

I tried this using both "UI for WPF Q1 2014" as well as "UI for WPF Q2 2014"
I don't see what I am missing here.


            <telerik:RadTimeline x:Name="RadTimeline1"
                                 Height="230"
                                 VerticalAlignment="Top"
                                 Margin="6"
                                 PeriodStart="{Binding StartDate, Mode=TwoWay}"
                                 PeriodEnd="{Binding EndDate, Mode=TwoWay}"
                                 StartPath="Date"
                                 DurationPath="Duration"
                                 IsSelectionEnabled="True"
                                 SelectionMode="Extended"
                                 ItemsSource="{Binding Data}"
telerik:StyleManager.Theme="Expression_Dark"
>
                <telerik:RadTimeline.Intervals>
                    <telerik:YearInterval />
                    <telerik:MonthInterval />
                    <telerik:WeekInterval />
                    <telerik:DayInterval />
                </telerik:RadTimeline.Intervals>
            </telerik:RadTimeline>
Martin Ivanov
Telerik team
 answered on 29 Oct 2014
5 answers
235 views
I'm trying to set up a project using the Office2013 XAML theme files directly, with the intention of altering a copy of the theme files directly to fit our requirements.

So I have a project in which I include all the XAML files found under "UI for WPF Q2 2014\Themes.Implicit\WPF40\Office2013\Themes". These are set to a resource build action, using MSBuild:MarkupCompile, in the same manner as the Theme solution found in the same directory are the XAML files were taken from. I then reference this assembly in my project, and merge the Office2013 resource dictionaries from my custom assembly.

When I try to open a dialog with a RadColorEditor, I get the error message 
    Cannot set unknown member 'Telerik.Windows.Controls.MaskedInput.PreviewInputTextBox.IsReadOnly'

If I change my project to reference the UI for WPF Q2 2014\Binaries.NoXaml\WPF45\Telerik.Windows.Themes.Office2013.dll assembly, and change the merge lines to use the same dictionaries but from that assembly, it all works fine.

This suggests that the raw XAML files are not entirely correct? Or am I missing something?

Cheers
Jason
Evgenia
Telerik team
 answered on 28 Oct 2014
8 answers
363 views
Hello,
I am using RadDiagram and I am adding RadDiagramShape objects on the fly programatically. I use a simple DataTemplate which I want to use with created objects.And for each created shape, I want to set specific image and text which is defined in DataTemplate.
The problem I have is how to get FrameworkElement to pass with FindName.
Image imageInTemplate = (Image)Box.ContentTemplate.FindName("PartImageName", myContentPresenter);
What is the content presenter for the RadDiagramShape?
Here is the code snippet I use:

 

  <Window.Resources>
    <DataTemplate x:Key="SubItemTemplate"
      <Grid
        <Grid.ColumnDefinitions
        <ColumnDefinition Width="40*" /> 
        <ColumnDefinition Width="60*" /> 
        </Grid.ColumnDefinitions>
      <Image Margin="0" Grid.Column="0" x:Name="PartImageName" Stretch="Uniform" /> 
      <TextBlock Grid.Column="1" Text="Part ID" x:Name="PartID" /> 
      </Grid>
    </DataTemplate>
    </Window.Resources>
<telerik:RadDiagram Margin="2,2,2,2" x:Name="stateDiagram"
</telerik:RadDiagram>
private void Window_Loaded(object sender, RoutedEventArgs e)
{
  RadDiagramShape StateBox = new RadDiagramShape()
  {
    Width = 100,
    Height = 100,
    Geometry = ShapeFactory.GetShapeGeometry(CommonShapeType.RectangleShape),
    ContentTemplate = (DataTemplate)this.FindResource("SubItemTemplate"),
  };
  //now change dynamically the picture and the text of the StateBox:
  ContentPresenter myContentPresenter = FindVisualChild<ContentPresenter>(StateBox,0); 
  Image imageInTemplate = (Image)Box.ContentTemplate.FindName("PartImageName", myContentPresenter);
  imageInTemplate.Source = new Uri(strFilePath, UriKind.Absolute);
  TextBlock textBlockInTemplate = (TextBlock)Box.ContentTemplate.FindName("PartID", myContentPresenter);
  textBlockInTemplate.Text = "some part id";
  stateDiagram.AddShape(StateBox);
}

Thank you very much.
Mikhail.

 

 

 

Zarko
Telerik team
 answered on 28 Oct 2014
1 answer
123 views

I’m having trouble getting the automatic spell checker to work inside a radgridview column.

Here is a simplified version of my grid:

<telerik:RadGridView Grid.Row="1" ItemsSource="{Binding Path=Calls, Mode=TwoWay}" AutoGenerateColumns="False"
 GroupRenderMode="Flat"  
        SelectedItem="{Binding Path=SelectedCall, Mode=TwoWay}" CanUserInsertRows="True" CanUserDeleteRows="True"
        IsFilteringAllowed="False"
        RowIndicatorVisibility="Collapsed"
        ShowGroupPanel="False"
        ValidatesOnDataErrors="InViewMode"
        AlternationCount="2" Name="CallsGrid"
        telerik:RadGridViewSpellCheckHelper.IsSpellCheckingEnabled="True">
<telerik:RadGridView.Columns>
 <telerik:GridViewDataColumn Header="Notes" telerik:RadGridViewSpellCheckHelper.IsSpellCheckingEnabled="True"
  DataMemberBinding="{Binding CallNotes, Mode=TwoWay}" MinWidth="100" Width="*" >
        </telerik:GridViewDataColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>

The spell checker comes up after I move out of the notes field and works as expected, however after the spell checker is done and has the correct notes string, it does NOT update the field with the corrected string.

I have noticed the same behavior in the online demos for WPF spellchecker (Spell Checking RadGridView) the manual triggering of spell checking column works however the automatic spell checking column does not update the field with the correct values.

What am I doing wrong?
Aylin
Telerik team
 answered on 28 Oct 2014
4 answers
186 views
Hi All,

We are facing some design issues in our project after upgrading to .Net framework 4.5.1 in VS2013. We use WPF with teleric controls and we can see some UI alignment issues and slow rendering of the charts. The same setup is working fine with .Net 4.0 framework.


Can you please let us know if there are any Known issues Telerik Controls with 4.5.1 framework? Or can you suggest any solution for this?


Your quick help is much appreciated.
Yana
Telerik team
 answered on 28 Oct 2014
3 answers
152 views
The maximized tile height seems to be the height of the sum of the Minimized row heights. In this case I need the maximized tile height to be the height of the TileView container. Is there any way to set the maximized height independent of the MinuminizedRowHeight * TileCount
Pavel R. Pavlov
Telerik team
 answered on 28 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?