Telerik Forums
UI for WPF Forum
3 answers
129 views
I'm having quite a hard time getting the styling done, it seems like I'm experimenting rather than designing. I tried using blend but go absolutely nowhere, now I am writing the styling in xaml. To override the styling I am using following code:

RowStyle="{DynamicResource TopGridRow}"
AlternateRowStyle="{DynamicResource TopGridAlternateRow}"
HeaderRowStyle="{DynamicResource TopGridHeaderRow}"
VerticalGridLinesBrush="{DynamicResource TopGridVerticalBrush}"
HorizontalGridLinesBrush="{DynamicResource TopGridHorizontalBrush}"
telerik:Theming.Theme="Vista"

my current result looks like this:
http://dl.dropbox.com/u/11491365/gridviewWhite2.JPG

following problems:
1. I dont know how to adjust the style for the rectangle at the top-left
2. How do I change the gray padding around the hierarchical element
3. I applied the theme Vista application wide, but it is only being applied to the radgridview in the lower hierarchy, thats why i am setting the Theme on the control itself again
4. Is there a better approach to this?
5. What on earth is that dark line between JobID and Auflage (you can drag it around for reasons unknown to me. has a gradient on it)
marc
Top achievements
Rank 1
 answered on 07 Oct 2011
6 answers
149 views
I'm really new to Telerik.  We've purchased the suite a while ago, but haven't had a chance to use it yet.  Now I'm trying to.  I've installed it onto my desktop, and so has my colleague.  When creating a new WPF project, selecting the Telerik RAD projects, all I have in the Project Configuration Wizard, if a Components tab.  My colleague has the Components tab and a Theme tab.  Why is it that I don't have the Theme's tab, and how do I get it?
Rod
Top achievements
Rank 1
 answered on 07 Oct 2011
2 answers
84 views
Hi -- I'm wondering about the best idea for a UI metaphor I'm trying to replicate.  I'm trying to create something like a query builder along the lines of the Work Item Query Editor window within VS 2010.  This is shown in two places using two slightly different approaches in the following web page:TFS 2010 Work Item Tracking Blog Entry.

The key screenshots are the first and the fifth.  I'm specifically looking for thoughts on how to achieve the effect they use for grouping and ungrouping conditions in the query.  If you highlight two (or more) adjacent rows that are not already grouped, it allows you to group them.  If you do that, there is a visual indicator that now spans the grouped rows.  If you leave them highlighted, you can ungroup them.  Further, you can continue the grouping beyond the grouping you've already created.

I've got something similar I need to create and am looking for some thoughts on how to do this with the Telerik controls (I figured the GridView would be the area where this would apply). 

It doesn't need to look exactly like the VS 2010 editor, just something that will visually make sense to users.

Thanks in advance for any thoughts on this....
-Erik
Erik
Top achievements
Rank 2
 answered on 07 Oct 2011
1 answer
186 views
Hi,

I am trying to have a an autocomplete combobox with an Editorstyle at the sametime.

The autocomplete works without the Editorstyle, but putting the editorstyle in like this, will stop the autocomplete from working.

Any idears ?.

Best

Ole



<
telerik:GridViewComboBoxColumn UniqueName="cmbActionBy"  IsComboBoxEditable="True" Header="Action by" DataMemberBinding="{Binding Path=tblContact}"  telerik:TextSearch.TextPath="ShortName" DisplayMemberPath="ShortName" Width="80" SortMemberPath="tblContact.ShortName" EditorStyle="{Binding Source={StaticResource MyStyle}}">

 

 

<Style x:Key="MyStyle" TargetType="telerik:RadComboBox">
 
           <Setter Property="ItemTemplate">
 
               <Setter.Value>
 
                   <DataTemplate>
 
                       <StackPanel Orientation="Vertical"   VerticalAlignment="Center">
                           <TextBlock Text="{Binding Path=Name}" TextAlignment="Left" HorizontalAlignment="Left" />
                           <TextBlock Text="{Binding Path=ShortName}" TextAlignment="Right" HorizontalAlignment="Right" Margin="5,0,0,0"/>
                       </StackPanel>
 
                   </DataTemplate>
 
               </Setter.Value>
 
           </Setter>
 
       </Style>

Maya
Telerik team
 answered on 07 Oct 2011
1 answer
167 views
I have a dialog with a grid view. When the dialog is closed, the view is kept in memory. I used ANTS memory profile to find the cause. See the attached retention graph.

It shows that my view (ImportRecipesView) is references by a grid row which is kept in memory by some event handlers. Do you have any idea why the event handlers aren't released when the dialog is closed?

Am I missing something?

BTW: Here's a link how to read the graph: Retention Graph
Vlad
Telerik team
 answered on 07 Oct 2011
2 answers
175 views

I thought I had everything going well with my rad datepicker column from an autogenerated columns radgridview (chosen using a template selector), and it works well, except that when I add the row, it is cleared, and the user must then edit the column in the grid to reselect the date.

I think that to solve this both datatemplates for my date column (cell edit template, and cell template) must have the same binding (one is text the other rad datepicker control).

Unfortunately I cant seem to bind the RadDatePicker control's selected value to anything in my view model, without getting the error

 

property not found on 'object' ''DataRowView'


Note that if i just bind SelectedValue="1/1/1991" this always works, but when i do SelectedValue="{Binding RadDateSourceProp}" i get the error.

Any suggestions?

forgot to add, the grid itself is bound to a datatable as itemsource.
Chris
Top achievements
Rank 1
 answered on 07 Oct 2011
1 answer
103 views
Hi!,

How do I show the value of a bar when I'm hovering over the bar's legend? Just as the value is displayed when you hover over the bar itself.

I'm am using this to highlight the bar I'm hovering on:

productionSeriesMapping.SeriesDefinition.InteractivitySettings.HoverScope = InteractivityScope.Series


Thanks, Jose
Evgenia
Telerik team
 answered on 07 Oct 2011
1 answer
117 views
Hi, I've tried to reproduce the "Getting Started" example of DragAndDrop but I can't make it work (drag event not fired).

Here my XAML code:

<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="WpfApplication5.GettingStarted"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
         
        <DataTemplate x:Key="ApplicationDragTemplate">
 
            <Image Source="{Binding IconPath}"
               Stretch="None"
               VerticalAlignment="Top" />
        </DataTemplate>
        <Style TargetType="ListBoxItem"
           x:Key="draggableItemStyle">
            <Setter Property="HorizontalContentAlignment"
               Value="Stretch" />
            <Setter Property="telerik:RadDragAndDropManager.AllowDrag"
               Value="True" />
 
        </Style>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot"
       Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200" />
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="200" />
        </Grid.ColumnDefinitions>
        <ListBox x:Name="allApplicationsBox"
               telerik:RadDragAndDropManager.AllowDrop="True"
               ItemContainerStyle="{StaticResource draggableItemStyle}">
             
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Width="150">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Image Grid.Row="0"
                           HorizontalAlignment="Center"
                           Source="{Binding IconPath}"
                           Width="32"
                           Height="32"
                           Margin="0 0 5 0" />
                        <TextBlock Grid.Row="1"
                               Text="{Binding Name}"
                               FontWeight="Bold"
                               HorizontalAlignment="Center" />
                        <TextBlock Text="{Binding Author}"
                               Grid.Row="2"
                               HorizontalAlignment="Center" />
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <!--My Applications-->
        <ListBox x:Name="myApplicationsBox"
               telerik:RadDragAndDropManager.AllowDrop="True"
               ItemContainerStyle="{StaticResource draggableItemStyle}"
               Grid.Column="2">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel VerticalAlignment="Stretch"
                           HorizontalAlignment="Stretch">
                        <Image Source="{Binding IconPath}"
                           Margin="0 0 3 0"
                           HorizontalAlignment="Center" />
                        <TextBlock Text="{Binding Name}"
                               HorizontalAlignment="Center" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Columns="3"
                                       HorizontalAlignment="Left"
                                       VerticalAlignment="Top" />
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
        </ListBox>
    </Grid>
</UserControl>

And here my C# code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using Telerik.Windows.Controls.DragDrop;
using Telerik.Windows.Controls;
 
namespace WpfApplication5
{
 
    public class ApplicationInfo
    {
        public ApplicationInfo(string iconPath, string name, string author)
        {
            this.IconPath = iconPath;
            this.Name = name;
            this.Author = author;
        }
        public String IconPath
        {
            get;
            set;
        }
        public String Name
        {
            get;
            set;
        }
        public String Author
        {
            get;
            set;
        }
    }
 
    public partial class GettingStarted : UserControl
    {
        public static ObservableCollection<ApplicationInfo> GenerateApplicationInfos()
        {
            ObservableCollection<ApplicationInfo> data = new ObservableCollection<ApplicationInfo>();
            for (int i = 1; i <= 5; i++)
            {
                data.Add(new ApplicationInfo("Images/nature" + i + ".jpg", "Nome" + i, "Autore" + 1));
            }
            return data;
        }
        private ObservableCollection<ApplicationInfo> allApplications = GenerateApplicationInfos();
        private ObservableCollection<ApplicationInfo> myApplications = new ObservableCollection<ApplicationInfo>();
        public GettingStarted()
        {
            InitializeComponent();
            allApplicationsBox.ItemsSource = allApplications;
            myApplicationsBox.ItemsSource = myApplications;
 
 
            RadDragAndDropManager.AddDragQueryHandler(this, OnDragQuery);
            RadDragAndDropManager.AddDragInfoHandler(this, OnDragInfo);
            RadDragAndDropManager.AddDropQueryHandler(this, OnDropQuery);
            RadDragAndDropManager.AddDropInfoHandler(this, OnDropInfo);
        }
        // OnDragQuery event handler
        private void OnDragQuery(object sender, DragDropQueryEventArgs e)
        {
            ListBoxItem listBoxItem = e.Options.Source as ListBoxItem;
            ListBox box = ItemsControl.ItemsControlFromItemContainer(listBoxItem) as ListBox;
            if (e.Options.Status == DragStatus.DragQuery && box != null)
            {
                e.Options.Payload = box.SelectedItem;
                ContentControl cue = new ContentControl();
                cue.ContentTemplate = this.Resources["ApplicationDragTemplate"] as DataTemplate;
                cue.Content = box.SelectedItem;
                e.Options.DragCue = cue;
                e.Options.ArrowCue = RadDragAndDropManager.GenerateArrowCue();
            }
            e.QueryResult = true;
        }
        // OnDropQuery event handler
        private void OnDropQuery(object sender, DragDropQueryEventArgs e)
        {
            ItemsControl box = e.Options.Destination as ItemsControl;
            IList<ApplicationInfo> itemsSource = box.ItemsSource as IList<ApplicationInfo>;
            ApplicationInfo payload = e.Options.Payload as ApplicationInfo;
            e.QueryResult = payload != null && !itemsSource.Contains(payload);
        }
        // OnDropInfo event handler
        private void OnDropInfo(object sender, DragDropEventArgs e)
        {
            ItemsControl box = e.Options.Destination as ItemsControl;
            IList<ApplicationInfo> itemsSource = box.ItemsSource as IList<ApplicationInfo>;
            ApplicationInfo payload = e.Options.Payload as ApplicationInfo;
            if (e.Options.Status == DragStatus.DropComplete)
                if (!itemsSource.Contains(payload))
                    itemsSource.Add(payload);
        }
        // OnDragInfo event handler
        private void OnDragInfo(object sender, DragDropEventArgs e)
        {
            ListBoxItem listBoxItem = e.Options.Source as ListBoxItem;
            ListBox box = ItemsControl.ItemsControlFromItemContainer(listBoxItem) as ListBox;
            IList<ApplicationInfo> itemsSource = box.ItemsSource as IList<ApplicationInfo>;
            ApplicationInfo payload = e.Options.Payload as ApplicationInfo;
            if (e.Options.Status == DragStatus.DragComplete)
            {
                if (payload != null && itemsSource.Contains(payload))
                {
                    itemsSource.Remove(payload);
                }
            }
        }
    }
}


 Can anyone help me?

Thank You
Sergio
Maya
Telerik team
 answered on 07 Oct 2011
0 answers
178 views
Hi,

I am using this solution : http://www.telerik.com/community/forums/wpf/gridview/binding-to-the-isexpandable-proeprty.aspx 
An i want to show a unique HierarchyItem expanded.

And when I use this code, the IsExpanded property is reseted :

private void MyGrid_RowIsExpandedChanged(object sender, RowEventArgs e)
        {
            if (changing)
                return;
 
            this.changing = true;
 
            if ((e.Row as GridViewRow).IsExpanded)
            {
                this.MyGrid.CollapseAllHierarchyItems();
                this.MyGrid.ExpandHierarchyItem(e.Row.DataContext);
 
            }
 
            this.changing = false;
        }
 
        private void AttributesGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            ExpandHierarchyItem((RadGridView)sender);
        }
 
        private void ExpandHierarchyItem(RadGridView sender)
        {
            sender.CollapseAllHierarchyItems();
            sender.ExpandHierarchyItem(sender.SelectedItem);
        }
 
        private void MyGrid_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
        {
            ExpandHierarchyItem((RadGridView)sender);
        }

Do you have a way for to resolve this problem

Thanks
Regards

rad
Top achievements
Rank 1
 asked on 07 Oct 2011
1 answer
145 views
Currently using RadControls for WPF Q2 2011.  It seems that the sparkline normal r4ange is not rendered when the NormalRangeTop and NormalRangeBottom are BOTH set to values that lie outside the range of data points. 

So, for example, if my data points range from 20 to 40, then

When Top and Bottom are:
39 and 0, normal range appears
41 and 0, does not appear
70 and 20, normal range appears
70 and 10, doea not appear

Is this by design?  Or is this a bug?  Or am I missing a property setting?  If by design, plase explain.
Thanks
Dan
Yavor
Telerik team
 answered on 07 Oct 2011
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?