Telerik Forums
UI for WPF Forum
4 answers
128 views
Hello,
I am running into a problem with the RadTileView, and the RadFluidContentControl.  I am binding the ItemsSource to a list in my ViewModel, and in turn, I am using the ContentTemplate to render the items, I added a RadFluidContentControl, and use the SmallContentTemplate, MediumContentTemplate, and LargeContentTemplate but it never changes the content in the template,  The same xaml using hard coded content seems to work fine.  Is this a bug in the RadFluidContentControl,or am I using it wrong? 
Below is the Xaml that I am working with.  Rooms is a list of classes with a "DisplayName" property.

Thanks in advance for any help.
        <telerik:RadTileView Margin="8" MinimizedColumnWidth="220" ItemsSource="{Binding Rooms}" > 
            <telerik:RadTileView.ItemTemplate> 
                <DataTemplate> 
                    <TextBlock Text="{Binding DisplayName}">  
                    </TextBlock> 
                </DataTemplate> 
            </telerik:RadTileView.ItemTemplate> 
            <telerik:RadTileView.ContentTemplate> 
                <DataTemplate> 
                    <telerik:RadFluidContentControl BorderBrush="black" BorderThickness="2" SmallToNormalThreshold="190, 140" 
                                    NormalToSmallThreshold="190, 140" NormalToLargeThreshold="320, 320" 
                                    LargeToNormalThreshold="320, 320" ContentChangeMode="Automatic">  
                        <telerik:RadFluidContentControl.SmallContentTemplate> 
                            <DataTemplate> 
                                <Grid> 
                                    <TextBlock Text="{Binding DisplayName}"></TextBlock> 
                                    <TextBlock Text="small"></TextBlock> 
                                </Grid> 
                            </DataTemplate> 
                        </telerik:RadFluidContentControl.SmallContentTemplate> 
                        <telerik:RadFluidContentControl.ContentTemplate> 
                            <DataTemplate> 
                                <Grid> 
                                    <TextBlock Text="{Binding DisplayName}"></TextBlock> 
                                    <TextBlock Text="Medium"></TextBlock> 
                                </Grid> 
                            </DataTemplate> 
                        </telerik:RadFluidContentControl.ContentTemplate> 
                        <telerik:RadFluidContentControl.LargeContentTemplate> 
                            <DataTemplate> 
                                <local:RoomControl Margin="10" HorizontalAlignment="Left" VerticalAlignment="Top"  DataContext="{Binding}"/>  
                            </DataTemplate> 
                        </telerik:RadFluidContentControl.LargeContentTemplate> 
                    </telerik:RadFluidContentControl> 
                </DataTemplate> 
            </telerik:RadTileView.ContentTemplate> 
        </telerik:RadTileView> 
 
Lance
Top achievements
Rank 1
 answered on 06 Jul 2010
1 answer
241 views
I have set the ItemsSource of my combobox column to a list of custom objects.  This works fine and I am able to update my object with the selected item from the combobox.  The problem is that my users will need to be able to set this column to null, so I add a null to the list of objects.  I can see the null in the list fine, but whenever I select it, the property of the DataMember SalesRep does NOT get set at all.  I have to select a different item in the list.  I've put a break point on the Property set and it isn't firing at all on null.  Is this a bug, or is there a "better" way?

    <DataTemplate DataType="{x:Type lib:Security.UserInfo}">
        <TextBlock>
                <TextBlock.Text>
                    <MultiBinding StringFormat="{}{0}, {1}">
                        <Binding Path="LastName" />
                        <Binding Path="FirstName" />
                    </MultiBinding>
                </TextBlock.Text>
        </TextBlock>
    </DataTemplate>  
...
<telerik1:GridViewComboBoxColumn Name="SalesRepColumn" Header="Sales Rep" DataMemberBinding="{Binding SalesRep, ValidatesOnDataErrors=True,ValidatesOnExceptions=True,UpdateSourceTrigger=PropertyChanged}"/>
...
CollectionViewSource userInfoSource = this.FindResource("userInfoSource") as CollectionViewSource;
var ul = UserInfoList.GetUserInfoList().OrderBy(u => u.LastName).ToList();                        
ul.Insert(0, null);
userInfoSource.Source = ul;
SalesRepColumn.ItemsSource = userInfoSource.View;

...

public UserInfo SalesRep {
get { return GetProperty(SalesRepProperty); }
set { _salesRep = value; }
}


Pavel Pavlov
Telerik team
 answered on 06 Jul 2010
1 answer
137 views
Hi All,

I have a Radgrid element with auto generate columns set to true,
I want to change background color of cells according to the values that are bounded.

How this can be done programatically?
 
I don't specify the coulmns in xaml..? and I can't hook to some appropriate event..
and moreover I can't loop over the rows and the cells.

Please advise,
Mark
Vlad
Telerik team
 answered on 06 Jul 2010
1 answer
100 views
Is it possible to Handle the event for certain items in my Outlook bar, for some of the items I wish to expand the Content and show it in the Pane.

For two of my items, I just want to get the event of it being clicked and selected, but without it expanding in the bar.

I'd like this with Databinding Style if possible.


Cheers, David Poole.
Viktor Tsvetkov
Telerik team
 answered on 06 Jul 2010
1 answer
188 views
Hi,

I'm trying to create a custom control library using telerik controls as base clases, and creating a default styleguide based on the default telerik styles for each control.

Basically, what I have (as if I was extending from standard WPF controls) is a ResourceDictionary (Generic.xaml) with a Targeted Style for each Custom Control, using the 'BasedOn' property. Something like this:

<Style BasedOn="{StaticResource {x:Type ComboBox}}"  
       TargetType="{x:Type local:MyComboBox}">  
        <Setter Property="Background" Value="Red" />  
        <Setter Property="Foreground" Value="DarkGray" />  
</Style> 



Regrettably, it seems this doesn't work out of the box with telerik, I mean, using RadComboBox as StaticResource. I've also tried using the ThemeResourceKey with no luck:

<Style TargetType="{x:Type local:MyComboBox}"  
               BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:Office_BlackTheme, ElementType=Controls:RadComboBox}}">  
    <Setter Property="Background" Value="Red" />  
    <Setter Property="Foreground" Value="DarkGray" />  
</Style> 


The MyComboBox file looks like this:
public class MyComboBox : RadComboBox  
{  
        static MyComboBox ()  
        {  
            DefaultStyleKeyProperty.OverrideMetadata(typeof(MyComboBox), new FrameworkPropertyMetadata(typeof(MyComboBox)));  
        }  
}  


I also tried overriding the TargetType of the inherited control, again, no luck:

[LocalizabilityAttribute(LocalizationCategory.NeverLocalize)]  
[Ambient]  
public Type TargetType  
{  
    get { return typeof (RadComboBox);}   
}  

Any suggestions?

Thanks,

--
R.

Pana
Telerik team
 answered on 06 Jul 2010
4 answers
335 views
How to add the Rad ContextMenu to Application resource so that it can be used on other windows as well.
Xaria D
Top achievements
Rank 1
 answered on 06 Jul 2010
1 answer
165 views


Hi,

I’m trying to implement a piece of functionality on a floating window that will minimise/re-group the floating window back to the main area of the docking control.

Is there a way to achieve this?
Chris.

Chris Ryder
Top achievements
Rank 1
 answered on 05 Jul 2010
7 answers
182 views
I am using RadDocking along with Prism.  I found the sample provided by Telerik on the subject and i am using it as well.

My problem is that i want to destroy the Region when a RadPane is closed.  Which is something the sample is not doing.

So, it brings us to this:

protected override void Adapt(IRegion region, RadPaneGroup regionTarget) 

At this stage, i would like to be able to get a reference to the RadDocking, to subscribe the Close event, and then do the destroy Region stuff.

But i can't figure out how to get the RadDocking from a RadPaneGroup.  I tried several FindParent function, but none seems to be able to travel up the VisualTree to the RadDocking.

I am using the latest internal build.

Thank you for any help.
Wagner
Top achievements
Rank 1
 answered on 05 Jul 2010
6 answers
364 views
I'm having trouble trying to obtain/apply a default property value from a theme.  Certain actions in my application change the GridViewHeaderCell's foreground property to a color different than that of the theme.  After it changes, I cannot figure out an easy way to change the color back to the theme's normal color.

Here is how I set the style to change the Header cells' color.
foreach(Telerik.Windows.Controls.GridViewColumn column in GridView.Columns) 
{ 
   Style s = new Style(typeof(GridViewHeaderCell), column.HeaderCellStyle); 
   s.Setters.Add(new Setter(GridViewHeaderCell.ForegroundProperty, new SolidColorBrush(Colors.Red))); 
   s.Seal(); 
   column.HeaderCellStyle = s; 
} 

To Change it back to the default, I've tried the following
column.ClearValue(GridViewHeaderCell.ForegroundProperty); //no noticeable impact 

column.ClearValue(GridViewColumn.HeadCellStyleProperty);  //no noticeable impact 

 
//this makes the foreground (some text) disappear altogether 
Style s = new Style(typeof(GridViewHeaderCell), column.HeaderCellStyle); 
s.Setters.Add(new Setter(GridViewHeaderCell.ForegroundProperty, null)); 
s.Seal(); 
column.HeaderCellStyle = s; 

None of those three ways seem to do the trick.  I tried clearing the value with the hope that the Theme's default header cell foreground property would take place once the local value is removed, but it doesn't seem to do anything.  

I have also tried getting and storing the default value before I change it (via GridViewHeaderCell.ForegroundProperty.GetMetadata(typeof(GridViewHeaderCell))...) but the PropertyMetaData object returned always indicates that the default Foreground for GridViewHeaderCell is a black brush, even when using themes like Office Black or Vista, which clearly do not use a black brush in their foregrounds. 

Has anyone dealt with this before, or know where I'm going wrong? If anyone can help me figure out the right way to do it, I will be most grateful.

Thanks,
Tom
Tom
Top achievements
Rank 1
 answered on 05 Jul 2010
1 answer
223 views
Hi,
I'm trying to programmatically set a FilterDescriptor to default filter out a number of rows in a dataset/datatable based on 
a Boolean property/column that I retrieve from my database/viewmodel. The problem is that I keep getting conversion error:
'The binary operator Equal is not defined for the types 'System.Object' and 'System.Boolean.'.

 paramView.FilterDescriptors.Add(new FilterDescriptor("Show",FilterOperator.IsEqualTo,true));

I've confirmed that the datatype from the database is a System.Data.DbType.Boolean (shows up in the grid as a checkbox column by default). Am I wrong in assuming that there should be a way of expressing 'true' that meets the requirement of the FilterExpression-generator, or is there another recommended way of accomplishing this task? 


Best regards,

Finn
 
Rossen Hristov
Telerik team
 answered on 05 Jul 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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?