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

Not sure where's the best place to post this.

We're looking to create a title for a grid that looks like a docking pane's title - that is, using the Outlook 2007 blue theme you get a light blue background and a navy-ish font color. We're looking for something that is themed the same so if we ever change the theme this will change as well.

Any idea how to do this?

Thanks,
yonadav
yonadav
Top achievements
Rank 1
 answered on 23 Mar 2010
4 answers
699 views
Hello

I'm trying to do the following in my c# code:
            Binding binding = new Binding(); 
            binding.Path = new PropertyPath("Image"); 
            binding.Mode = BindingMode.OneWay; 
 
            GridViewDataColumn imgCol = new GridViewDataColumn(); 
            DataTemplate dataTempl = new DataTemplate(); 
            FrameworkElementFactory rectElement = new FrameworkElementFactory(typeof(Rectangle)); 
            rectElement.SetBinding(Rectangle.FillProperty, binding); 
            rectElement.SetValue(Rectangle.WidthProperty, 16.0); 
            rectElement.SetValue(Rectangle.HeightProperty, 16.0); 
            dataTempl.VisualTree = rectElement; 
            imgCol.CellTemplate = dataTempl; 
 
            forGrid.Columns.Insert(0, imgCol); 

Every Row-Object has an "Image"-property which contains a XAML-Vectorgraphic. My target is to create a column for the rowobject which shows the image. I was able to do this with the WPF-Toolkit-DataGrid and was wondering how it would work with the RadGridView.

Any suggestions?

Thank you
NoRyb
NoRyb
Top achievements
Rank 1
 answered on 23 Mar 2010
1 answer
239 views
Hi,

I need to be able to change the left icon in a WPF RadWindow.Alert window. From what I understand this can only be achieved via a theme. Do you have a sample WPF VS2008 or VS2010 project demonstrating this ability?

Thanks heaps.
Miroslav Nedyalkov
Telerik team
 answered on 23 Mar 2010
5 answers
158 views
Hi All

I have created a grid based on the examples where the GroupFooterTemplate is used to show sums etc in the footer of each group.

This works fine if I group at runtime, but if I specify the groups at design time, this binding does not seem to be piking up the grouped totals and nothing is show in the GroupFooterTemplate sections.

I need to be able to configure design time grouping as it is crucial to our application.

Please find the xaml I am using below:
<grid:RadGridView x:Name="radGridViewRaw1" ItemsSource="{Binding collectionRaw}" Margin="0" ShowColumnFooters="True" ShowGroupFooters="True" 
                             AutoGenerateColumns="False" IsReadOnly="True" CanUserFreezeColumns="False"
                         
                        <grid:RadGridView.GroupDescriptors> 
                            <data:GroupDescriptor Member="PressType" /> 
                            <data:GroupDescriptor Member="ProcessWeek" /> 
                        </grid:RadGridView.GroupDescriptors> 
                         
                        <grid:RadGridView.Columns> 
                            <grid:GridViewDataColumn Header="Press Type" DataMemberBinding="{Binding PressType}" /> 
                            <grid:GridViewDataColumn Header="Week" DataMemberBinding="{Binding ProcessWeek}" /> 
 
                            <grid:GridViewDataColumn Width="200" Header="Copies Printed" TextAlignment="Right" DataMemberBinding="{Binding CopiesActual}" DataFormatString="{}{0:c}"
                                <grid:GridViewDataColumn.AggregateFunctions> 
                                    <data:SumFunction Caption="Sum: " ResultFormatString="{}{0:c}" SourceField="CopiesActual" /> 
                                    <data:AverageFunction Caption="Average: " ResultFormatString="{}{0:c}" SourceField="CopiesActual" /> 
                                </grid:GridViewDataColumn.AggregateFunctions> 
                                <grid:GridViewDataColumn.Footer> 
                                    <StackPanel Orientation="Vertical" Margin="5,0"
                                        <TextBlock Text="Custom footer with aggregates:" Margin="0,0,0,2" /> 
                                        <gridView:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center" Grid.Column="4"
                                            <ItemsControl.ItemTemplate> 
                                                <DataTemplate> 
                                                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center"
                                                        <TextBlock VerticalAlignment="Center" Text="{Binding Caption}" /> 
                                                        <TextBlock VerticalAlignment="Center" Text="{Binding FormattedValue}" /> 
                                                    </StackPanel> 
                                                </DataTemplate> 
                                            </ItemsControl.ItemTemplate> 
                                            <ItemsControl.ItemsPanel> 
                                                <ItemsPanelTemplate> 
                                                    <StackPanel Orientation="Vertical" /> 
                                                </ItemsPanelTemplate> 
                                            </ItemsControl.ItemsPanel> 
                                        </gridView:AggregateResultsList> 
                                    </StackPanel> 
                                </grid:GridViewDataColumn.Footer> 
                                <grid:GridViewDataColumn.GroupFooterTemplate> 
                                    <DataTemplate> 
 
                                        <StackPanel Orientation="Vertical" Margin="5,0"
                                            <TextBlock Text="Tester:" Margin="0,0,0,2" /> 
                                            <gridView:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center" Grid.Column="4"
                                                <ItemsControl.ItemTemplate> 
                                                    <DataTemplate> 
                                                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center"
                                                            <TextBlock VerticalAlignment="Center" Text="{Binding Caption}" /> 
                                                            <TextBlock VerticalAlignment="Center" Text="{Binding FormattedValue}" /> 
                                                        </StackPanel> 
                                                    </DataTemplate> 
                                                </ItemsControl.ItemTemplate> 
                                                <ItemsControl.ItemsPanel> 
                                                    <ItemsPanelTemplate> 
                                                        <StackPanel Orientation="Vertical" /> 
                                                    </ItemsPanelTemplate> 
                                                </ItemsControl.ItemsPanel> 
                                            </gridView:AggregateResultsList> 
                                        </StackPanel> 
                                    </DataTemplate> 
 
                                </grid:GridViewDataColumn.GroupFooterTemplate> 
                            </grid:GridViewDataColumn> 
                             
                        </grid:RadGridView.Columns> 
 
                    </grid:RadGridView> 

Pavel Pavlov
Telerik team
 answered on 23 Mar 2010
1 answer
153 views
Hi,

The Navigation bar in Outlook can be collapsed to the left. Does the Telerik RadOutlookBar provide this capability?

None of your samples show this feature.

Thanks heaps.
Kiril Stanoev
Telerik team
 answered on 23 Mar 2010
1 answer
345 views
Hey guys,
I am trying to use a RadComboBox to bind to a Specialized.StringCollection in my User.Settings. I am able to load the ComboBox from the collection, but the twoway binding does not seem to work. Is this possible with just stright XAML binding or do I need to create a whole class to accomodate this? I have the twoway binding working for my Window properties so I do know that I appear to have my ResourceDictionary configured correctly. Below is what I have so far.

XAML
<telerikInput:RadComboBox x:Name="comboTheme" ItemsSource="{Binding Source={StaticResource settings}, Path=Default.Theme}" 
                        SelectedItem="{Binding Default.Theme, Mode=TwoWay}"/> 

App.Config
<userSettings>       
    <EliteExtender.Shell.Properties.Settings> 
      <setting name="MainWidth" serializeAs="String">  
        <value>800</value> 
      </setting> 
      <setting name="MainHeight" serializeAs="String">  
        <value>625</value> 
      </setting> 
      <setting name="MainState" serializeAs="String">  
        <value /> 
      </setting> 
      <setting name="Theme" serializeAs="Xml">  
        <value> 
          <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xmlns:xsd="http://www.w3.org/2001/XMLSchema">  
            <string>Office_Blue</string> 
            <string>Office_Black</string> 
            <string>Office_Silver</string> 
            <string>Summer</string> 
            <string>Vista</string> 
            <string>Windows7</string> 
          </ArrayOfString> 
        </value> 
      </setting> 
    </EliteExtender.Shell.Properties.Settings> 
  </userSettings> 

ResourceDictionary (registered in App.Xaml)
<ResourceDictionary  
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:settings="clr-namespace:EliteExtender.Shell.Properties">  
    <ResourceDictionary.MergedDictionaries> 
        <ResourceDictionary> 
            <settings:Settings x:Key="settings" /> 
        </ResourceDictionary> 
    </ResourceDictionary.MergedDictionaries> 
</ResourceDictionary> 

Valeri Hristov
Telerik team
 answered on 23 Mar 2010
1 answer
185 views
i need to extend a RadComboBox which will load bind same data to itself. i dont want to rewrite this data binding code in different forms. so is it possible to extend combo box to bind some data and use it in other places?
Valeri Hristov
Telerik team
 answered on 23 Mar 2010
1 answer
99 views
Is it possible to set a margin for the last and first ticks that appears on the slider?
In the example giving at http://blogs.telerik.com/KirilStanoev/Posts/08-07-24/Using_ValueConverter_to_edit_Slider_s_TickTemplate.aspx?ReturnURL=%2fKirilStanoev%2fPosts.aspx
January and December do not have left and right margins, respectively. I do not want the first and last words to go beyond their ticks. What I want is the letter "J" of January to go right above its tick and so for the letter "R" of December.

I would also like to give the selected tick more visibility when selected. So I was wondering if it is possible to highlight or to maximize the tick when selected.
Kiril Stanoev
Telerik team
 answered on 23 Mar 2010
4 answers
167 views
Hi all,

I'm writing an app the MVVM way and have set up a ViewModel to bind to a view, which is a user control that contains a RadGridView. The data binds correctly and am able to see this however there are 3 group descriptors I wish to add and when I add this programmatically, the grid duplicates my rows, so now, my grid contains a duplicate or of each row. One type of the rows containing the full grouping while the other only with 2 of my 3 groupings. If I remove the groupings manually from the grid and re-add these they work perfectly (without duplicate rows). I am adding the group descriptions on the RadGridView_Load event. In the same event I also programmatically create columns.

Any help would be great.

Cheers,

Tim.
TSRG - IT
Top achievements
Rank 1
 answered on 23 Mar 2010
5 answers
425 views
Hi,

after trying around for quite a while, I decided to post a message here because I just don't get the meaning of the different properties of a GridViewComboBoxColumn.

I have a MainViewModel with an ICollectionView property called "ItemsView" which is used as ItemsSource for my RadGridView. The ICollectionView contains items of type PersonViewModel. PersonViewModel has several properties, one of them is called "AgeGroup" and has the type EnumViewModel<EAgeGroup>. The EnumViewModel<TEnum> class has an object property called "LocalizedValue". The MainViewModel also has a property "AvailableAgeGroups" of type ObservableCollection<EnumViewModel<EAgeGroup>> which contains EnumViewModels for all available enum values of type EAgeGroup.

Here is some sample code showing all these classes and properties:

public class MainViewModel 
    public ICollectionView ItemsView { /* ... */ } 
 
    public ObservableCollection<EnumViewModel<EAgeGroup>> AvailableAgeGroups { /* ... */ } 
 
public class PersonViewModel  
{  
    public EnumViewModel<EAgeGroup> AgeGroup  
    {  
        get { /* ... */ }  
        set { /* ... */ }  
    }  
}  
  
public class EnumViewModel<TEnum>  
{  
    public object LocalizedValue { /* ... */ }  

As you can imagine, the EnumViewModel class serves as a "string/localization provider" for enums.

Now, I want to create a ComboBoxColumn which uses the "AvailableAgeGroups" collection as the ItemsSource for the ComboBoxes. The relevant property in the PersonViewModel is, of course, "AgeGroup". So, this property should decide which of the age groups is selected. But, the displayed value should be taken from the "LocalizedValue" property of the value from the "AgeGroup" property. To sum it up, I want to display "PersonViewModel.AgeGroup.LocalizedValue", but the actual item should be "PersonViewModel.AgeGroup".

Now, from what I know from typical .NET controls, I created this column as follows:
<telerik:GridViewComboBoxColumn 
    UniqueName="AgeGroup" 
    ItemsSource="{Binding AvailableAgeGroups}" 
    DisplayMemberPath="LocalizedValue" 
    SelectedValueMemberPath="AgeGroup" 
    Header="Age Group" 
    IsFilterable="True"/> 

But nothing is displayed in the column, only empty cells. However, when I click the Filter button in the header, all possible values are displayed, so it somehow knows the values. Not everything is wrong, it seems. :)

Any advice on this one?
Thanks.
Pavel Pavlov
Telerik team
 answered on 22 Mar 2010
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?