Telerik Forums
UI for WPF Forum
3 answers
287 views
Looking for an example or insight on how to change the way a date is displayed in ScheduleView with the TimeLine View.

My view will be displaying a month at a time. So I do not need the Time to display and only need the numeric day to display.

I tried to pull it out in Expression Blend, but did not see a Template or Style that relates to the date header. Or is it called something else?

Any help would be great.

Thanks!
Dani
Telerik team
 answered on 08 Dec 2010
3 answers
94 views
Hi

I am Devloping a wpf application which uses RadWindowManager and RadWindow control. I have a requirement that while click on a button on a parent window a new Modular Windows Popup and when I click on Mimimize icon of that Modular window that should Mimimize inside that parent window through which tthat modular windows open's up. I dont want that modular window to show on windows taskbar in any of the state.

Kindly suggest of can I implement this.
Miroslav Nedyalkov
Telerik team
 answered on 08 Dec 2010
2 answers
71 views
Just curious, as this is possible in Winforms, but didn't see an example in the WPF demo. Is it possible to have 2 (or more) child grids?

Kind regards,
Stijn
Myth
Top achievements
Rank 1
 answered on 08 Dec 2010
1 answer
246 views
I have a RadGridView bound to a collection of ObservableCollection<Foo>. I am trying to bind a Command from the view model to a RadContextMenu, but it would seem that no matter how you describe the RelativeSource to the DataContext, the RadContextMenu is only taking its binding from the ItemsSource of the RadGridView. The routing worked perfectly well in the past using ContextMenu.MenuItem and using the hack of binding to the PlacementTarget.Tag, but no longer works when I changed from MenuItem to RadMenuItem (which are much nicer). I have had to resort to RadMenuItem_Click since I can find no way of getting the binding to work.

<Controls:RadGridView ShowGroupPanel="False"
                                  Grid.Row="1"
                                  x:Name="radGridView"
                                  DockPanel.Dock="Top"
                                  DataContext="{Binding}"
                                  d:DataContext="{d:DesignData Source=../../DesignData/SampleBinderCollection.xaml}"
                                  ItemsSource="{Binding}"
                                  AutoGenerateColumns="False"
                                  IsSynchronizedWithCurrentItem="True"
                                  SelectedItem="{Binding DataContext.SelectedBinder,Mode=TwoWay, RelativeSource={RelativeSource AncestorType=Window}}"
                                  IsReadOnly="True"
                                  Tag="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=DataContext}"
                                  FrozenColumnCount="5"
                                  ShowColumnFooters="True"
                                  DataContextChanged="RadGridView_OnDataContextChanged">
                <Controls1:RadContextMenu.ContextMenu>
                    <Controls1:RadContextMenu>
                        <Controls1:RadMenuItem Header="Go to this invoice/transaction"
                                  Command="{Binding DataContext.OpenTransactionWindowFromInvoiceCommand, RelativeSource={RelativeSource AncestorType=Window}}"
                                               Click="RadMenuItem_Click">
                            <Controls1:RadMenuItem.Icon>
                                <Image Source="/Cornhouse;component/Images/NewCardHS.png"
                                       Width="16"
                                       Height="16" />
                            </Controls1:RadMenuItem.Icon>
                        </Controls1:RadMenuItem>
                     </Controls1:RadContextMenu>
                </Controls1:RadContextMenu.ContextMenu>
 
etc ....
 
The viemodel is simply
public class MyViewModel:INotifyPropertyChanged
{
    public ICommand OpenTransactionWindowFromInvoiceCommand {get etc}
    public ObservableCollection<Foo> Collection
     { 
       get{return _collection;}
       set{
_collection=value;
           RaisePropertyChanged("Collection");
}           
}

I would really appreciate some help with this.

Many thanks
Jeremy
Konstantina
Telerik team
 answered on 08 Dec 2010
1 answer
92 views
I am using the tileview and would like to know if the following is possible.

When a tileviewitem is the large tile on the screen (i.e. the other tileviews are all to the right), I want it to have a particular content regardless of how big the tileviewitem is. So if the user makes the application window really small, I don't want the tileviewitem in the large tile to change its content based on the size. I want its contents to remain constant unless it is minimized to the right.

Thanks,

Billy Jacobs
Tina Stancheva
Telerik team
 answered on 07 Dec 2010
3 answers
250 views
I am binding my RadGridView's ItemsSource to a System.Data.DataSet.  This dataset is readonly and is not interpreted by my application...  it's just obtained and displayed for the user to view.  It comes from a web service and the idea is that this web service may change the contents being served up in the future.  The number of columns in the dataset may change down the road.

There is one important exception to this.  Once my application obtains the dataset from the web service, it adds a column onto it and populates it with objects of a complex type.
In my gridview, I'd like to display these objects with much more than just the default ToString.
I'd like to use a DataTemplate to do this.

I see the GridViewDataColumn's CellTemplate.  But I'm not defining GridViewDataColumns in my RadGridView, because, as I mentioned, I'm binding the GridView's ItemsSource to my DataSet.  So, at least at first glance, that doesn't seem useful to me.

In addition, I'm using the MVVM application model.  So although I'm tempted to drop the binding to the ItemSource, manually add a GridViewDataColumn for each of my columns, and set the CellTemplate on my special column, I'm resisting the urge.  Ideally I can do this all with binding.

How can I apply a DataTemplate to my cells while still binding to ItemsSource?

I wish I could specify a CellTemplateSelector for the entire GridView.  Then I'd just apply a special template when the cell contained an object of my type.

Thanks for any help.
Buzz



Maya
Telerik team
 answered on 07 Dec 2010
4 answers
543 views
It looks like a bug in System.Windows.DataTemplate, but I thought I'd ask here if you know a way around this bug:

Assigning a ToolTipTemplate to an InformationLater requires that you pass it a DataTemplate (of course - for binding), but the DataTemplate tip does not support CornerRadius (it seems broken).

<DataTemplate x:Key="CustomToolTipDataTemplate">
    <Border BorderBrush="Black" BorderThickness="2" CornerRadius="6" Background="#FDF2D4" MaxWidth="300">
        <Grid Margin="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="14" />
                <RowDefinition Height="12" />
                <RowDefinition Height="12" />
                <RowDefinition Height="12" />
                <RowDefinition Height="12" />
                <RowDefinition Height="12" />
                <RowDefinition Height="12" />
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0" FontWeight="Bold" FontFamily="Trebuchet MS" FontSize="12" Text="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='NAME', StringFormat=County: {0}}" />
            <TextBlock Grid.Row="1" FontWeight="Bold" FontFamily="Trebuchet MS" FontSize="10" Text="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='PAT_EST', StringFormat='Paternity Establishment Percentage: {0:0.##}'}" />
            <TextBlock Grid.Row="2" FontFamily="Trebuchet MS" FontSize="10" Text="Percent of Cases with Orders: 87" />
            <TextBlock Grid.Row="3" FontFamily="Trebuchet MS" FontSize="10" Text="Percent of Current Collected: 91" />
            <TextBlock Grid.Row="4" FontFamily="Trebuchet MS" FontSize="10" Text="Percent of Cases Paying Arrears: 84" />
            <TextBlock Grid.Row="5" FontFamily="Trebuchet MS" FontSize="10" Text="Medical Support Ratio: 74" />
            <TextBlock Grid.Row="6" FontFamily="Trebuchet MS" FontSize="10" Text="Cost Effectiveness Ratio: 96" />
        </Grid>
    </Border>
</DataTemplate>
 
However, if I omit ToolTipTemplate and use ToolTipservice to specify this and call a ControlTemplate for the tip, CornerRadius works fine!

<ToolTipService.ToolTip>
    <ToolTip Template="{StaticResource ToolTipTemplateXX}" HasDropShadow="True">
        <ToolTip.Content>
            <TextBlock
                Text="This is a test"
                FontFamily="Georgia" FontSize="14" TextWrapping="Wrap"/>
        </ToolTip.Content>
    </ToolTip>
</ToolTipService.ToolTip>

<ControlTemplate x:Key="ToolTipTemplateXX">
    <Border BorderBrush="Black" BorderThickness="2" CornerRadius="6" Background="#FDF2D4" MaxWidth="300">
        <Grid Margin="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="14" />
                <RowDefinition Height="12" />
                <RowDefinition Height="12" />
                <RowDefinition Height="12" />
                <RowDefinition Height="12" />
                <RowDefinition Height="12" />
                <RowDefinition Height="12" />
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0" FontWeight="Bold" FontFamily="Trebuchet MS" FontSize="12" Text="County: Centre" />
            <TextBlock Grid.Row="1" FontWeight="Bold" FontFamily="Trebuchet MS" FontSize="10" Text="Paternity Establishment Percentage: 98" />
            <TextBlock Grid.Row="2" FontFamily="Trebuchet MS" FontSize="10" Text="Percent of Cases with Orders: 87" />
            <TextBlock Grid.Row="3" FontFamily="Trebuchet MS" FontSize="10" Text="Percent of Current Collected: 91" />
            <TextBlock Grid.Row="4" FontFamily="Trebuchet MS" FontSize="10" Text="Percent of Cases Paying Arrears: 84" />
            <TextBlock Grid.Row="5" FontFamily="Trebuchet MS" FontSize="10" Text="Medical Support Ratio: 74" />
            <TextBlock Grid.Row="6" FontFamily="Trebuchet MS" FontSize="10" Text="Cost Effectiveness Ratio: 96" />
        </Grid>
    </Border>
</ControlTemplate>

Any idea why this is or how to work around it easily?

Thanks!
James
Top achievements
Rank 1
 answered on 07 Dec 2010
1 answer
71 views

Hi,

I am trying to automate the controls in subject. The site below tells me UI automation for these controls are not supported for wpf applications. Is there an update/recommended solution regarding the same that I can leverage for my UI automation? It may save me a lot of time :)!

http://www.telerik.com/help/silverlight/ui_automation_support.html

 


More information on my work around and where I am stuck:

  1. DateTimePicker control

Please see attached image for reference. Using UI Spy I can actually see the window and  all of its content for the “date” control. The automation ids are missing, but at least I see the “window” control exposed and the ‘text’ names that I can actually use in my helper function to get/set a specified date.

However, the clock portion of it is hidden from UI spy. I don’t know if this is another window control or something that is just embedded in the date window? Any ideas on how I can access the clock window?

 

  1. RowDetails control

This is not exposed at all in UI Spy L! I am thinking of a work around that I have not yet tested but before I invest time in it, I was wondering if you have a recommended solution that I can use?

 


Thank you for your help and time,

Harleen

Veselin Vasilev
Telerik team
 answered on 07 Dec 2010
1 answer
111 views

Hi,

I am trying to automate the controls in subject. The site below tells me UI automation for these controls are not supported for wpf applications. Is there an update/recommended solution regarding the same that I can leverage for my UI automation? It may save me a lot of time :)!

http://www.telerik.com/help/silverlight/ui_automation_support.html

 


More information on my work around and where I am stuck:

  1. DateTimePicker control

Please see attached image for reference. Using UI Spy I can actually see the window and  all of its content for the “date” control. The automation ids are missing, but at least I see the “window” control exposed and the ‘text’ names that I can actually use in my helper function to get/set a specified date.

However, the clock portion of it is hidden from UI spy. I don’t know if this is another window control or something that is just embedded in the date window? Any ideas on how I can access the clock window?

 

  1. RowDetails control

This is not exposed at all in UI Spy L! I am thinking of a work around that I have not yet tested but before I invest time in it, I was wondering if you have a recommended solution that I can use?

 


Thank you for your help and time,

Harleen

Veselin Vasilev
Telerik team
 answered on 07 Dec 2010
1 answer
65 views
I want to create rowdetails in behind code page because the contents displayed in rowdetails are vary according to the value of each column in one row. I read the example about this from telerik but it is defined when initialize not runtime. So anyone can suggest me how to do it in behind code.

Thank you,
GUIde
Rossen Hristov
Telerik team
 answered on 07 Dec 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?