Telerik Forums
UI for WPF Forum
2 answers
142 views
I have an image column that displays an 18x18 image and the column header text is making the column too wide. It just doesnt look right. But I can wrap the text in the header, it will cut the width of the column in half. Is there a way to do this?

Thanks in advance...
Vanya Pavlova
Telerik team
 answered on 06 Aug 2010
1 answer
150 views
Hi,

I hate writing a title for a thread because sometimes it's impossible to explain my question in short :)

Anyway I've found the below style from this article in KB. What I want to do is being able to reuse this style in more than one chart or more than one series by just changing the color. But although I've tried to make "TemplateBinding" to Background property of Bar class or to some other control part but I wasn't able to do it. I couldn't find the place (if I can) to specify the Background property.

<Window.Resources>  
        <Style x:Key="MyStyle" TargetType="{x:Type telerik:Bar}">  
            <Setter Property="Template" >  
                <Setter.Value>  
                    <ControlTemplate TargetType="{x:Type telerik:Bar}">  
                        <Rectangle  
                                   x:Name="PART_DefiningGeometry"  
                                   Fill="Red"
                                   Stroke="Pink"   
                                   StrokeThickness="3"   
                                   Height="{TemplateBinding ActualHeight}"  
                                   Width="{TemplateBinding ActualWidth}"/>  
                    </ControlTemplate>  
                </Setter.Value>  
            </Setter>  
        </Style>  
    </Window.Resources>

As a summary what I want to do is to bind Fill property to some other property on a control and reuse this style. It should be easy! But not for me?

Does anyone have an idea?

Thanks
Sia
Telerik team
 answered on 06 Aug 2010
3 answers
238 views
Hi,

I'm trying to create a custom datetime picker from inheriting from RadDateTimePicker control.

Can you please tell the assembly name(dll name), where i can inhert the RadDateTimePicker class.

Thanks,
-Narendra
Dani
Telerik team
 answered on 06 Aug 2010
3 answers
206 views
Hi,

First, sorry for my bad english, i'm a french student in internship.

Well, in my application, i'm using MVVM pattern, and I've created an UserControl, with a telerik chart (using LineSerie).

I would like to change the line color when a property change.

Here is an example of what I want to do:

<Grid DataContext="{Binding PublicationCollecteurVM}" Width="auto" Height="auto">
           <Grid.Resources>
              <Style TargetType="telerik:Chart">
                 <Style.Triggers>
                       <!-- Well, You can imagine that I'm trying to change Line color-->
                       <DataTrigger Binding="{Binding Path=GestionNiveau,NotifyOnSourceUpdated=True}" Value="2">
                           <Setter Property="Chart.LineColor" Value="#FCB143"/>
                       </DataTrigger>
                       <DataTrigger Binding="{Binding Path=GestionNiveau,NotifyOnSourceUpdated=True}" Value="1">
                           <Setter Property="Chart.LineColor" Value="#FFFF48"/>
                       </DataTrigger>
                       <DataTrigger Binding="{Binding Path=GestionNiveau,NotifyOnSourceUpdated=True}" Value="3">
                           <Setter Property="Chart.LineColor" Value="#FE761B"/>
                       </DataTrigger>
                 </Style.Triggers>
              </Style>
           </Grid.Resources>
           <telerik:RadChart x:Name="RadChart1"  telerik:StyleManager.Theme="Office_Black"  Grid.Row="1" Height="193" Width="372" Grid.Column="1" ItemsSource="{Binding NbHitLus}">         
               <telerik:RadChart.DefaultView>
                   <telerik:ChartDefaultView>
                       <telerik:ChartDefaultView.ChartArea>
                           <telerik:ChartArea LegendName="CustomLegend">
                               <telerik:ChartArea.AxisX>
                                   <telerik:AxisX MajorGridLinesVisibility="Collapsed"
                                                  Title="Minute" />
                               </telerik:ChartArea.AxisX>
                               <telerik:ChartArea.AxisY>
                                   <telerik:AxisY MajorGridLinesVisibility="Collapsed"
                                                  MinorTicksVisibility="Visible"
                                                  Title="NbHitsLus" AutoScale="True" />
                               </telerik:ChartArea.AxisY>
                           </telerik:ChartArea>
                       </telerik:ChartDefaultView.ChartArea>
                       <telerik:ChartDefaultView.ChartLegend>
                           <telerik:ChartLegend Visibility="Collapsed" x:Name="CustomLegend" UseAutoGeneratedItems="True" Width="0">
                               <telerik:ChartLegend.Header>Custom legend header</telerik:ChartLegend.Header>
                           </telerik:ChartLegend>
                       </telerik:ChartDefaultView.ChartLegend>
                       <telerik:ChartDefaultView.ChartTitle>
                           <telerik:ChartTitle HorizontalAlignment="Center" >
                               <TextBlock TextAlignment="Center">
                                   <TextBlock Text="{Binding infoProg}"/>
                                   <LineBreak/>
                                   <TextBlock Margin="-8,0,0,0">Numéro collecteur :</TextBlock>
                                   <TextBlock Text="{Binding IdCollect}"></TextBlock>
                                   <TextBlock Padding="10,0,0,0">Numéro log :</TextBlock>
                                   <TextBlock Text="{Binding IdLog}"></TextBlock>
                               </TextBlock>
                           </telerik:ChartTitle>
                       </telerik:ChartDefaultView.ChartTitle>
                   </telerik:ChartDefaultView>
               </telerik:RadChart.DefaultView>
               <telerik:RadChart.DefaultSeriesDefinition>
                   <telerik:LineSeriesDefinition/>
               </telerik:RadChart.DefaultSeriesDefinition>
           </telerik:RadChart>
       </Grid>

So first could you tell me how to change Line color ?

Thank's
Yves
Top achievements
Rank 1
 answered on 06 Aug 2010
9 answers
279 views
I'm having some really bad performance when adding rows to the grid. I've got the grid items bound to an ObservableCollection. I'm then adding 7000 rows one-by-one to this collection. It basically freezes up for a couple of minutes.

I've done some profiling to try and find out what's holding things up and it seems to be spending about a 1/3 of the time in QueryableCollectionView:ProcessSynchronousCollectionChangedWithAdjustedArgs. Is there a way to set up the grid to avoid this call?

The main problem in that method is that it calls PropertyChangeInfo:GetChangedPropertyNames which compiles a linq expression foreach each propertyAccess. Any suggestions for improving the performance there?

Thanks!
TSRG - IT
Top achievements
Rank 1
 answered on 06 Aug 2010
8 answers
147 views
Hi,

I'm new to Telerik Controls. I'm trying to use the carousel controls in Expression Blend 4; having the few questions below

- Unlike the RadCaruosel for WinForm, I couldn't specify the eliptical path for the carousel items in Expression Blend (and VS2010), on WPF. Is that a limitation on this control for WPF currently? If not, how can I set the eliptical path (at design time)
- I've 8 items on the Carousel control (I tried it on Carousel and CarouselPanel), but only 5 are visible at a time. Other three would scroll in when I click the item near to them. Is there a way I can show all the 8 controls on my real estate?

Lastely, How can I compare and identify whether the user clicked on the top most item on the Carousel Panel? For example, out of my 8 items, if the user clicks on the item 6 it would be made as the top item. When the user clicks on it again, I want to identify it and perform some action.

Thanks in advance.
Ela
Vlad
Telerik team
 answered on 06 Aug 2010
1 answer
97 views
Hello,
   I am trying to create an unbounded link on the grid using the

GridViewHyperlinkColumn

and the link is not showing up. Can you please help me with this issue?

Thanks
Vlad
Telerik team
 answered on 06 Aug 2010
1 answer
92 views
I have and application with a user control that is a font chooser. It is nothing more than a single row of comboboxes. This user control (FontChooser) raises a selectionChangedEvent when any of the comboboxes are changed.
In my parent program I use a foreach loop to create a new FontChooser with a unique name for each item it is associated with (see code). So, for example I have eleven items, each with a FontChooser control  fc_A - K.
I have an event hander that handles the SelectionChangedEvent for all of the FontChoosers. When an event is fired I use the e.OrginalSource to capture which FontChooser fc_A -K  is being changed ex: FontChooser fc = (e.OriginalSource as FontChooser);. However, no matter which FontChooser is changed the last one added shows up as the OriginalSource. So, If where to write the fc name to the Console with Console.Out.WriteLine( fc.Name); I will get something like fc_K and fc_B, or fc_K and fc_K. The event seems to fire twice and always with the last FontChooser added to the parent app. BTW,I have tried to use e.Source and Sender as FontChooser, all produce the same result. If anyone has any ideas I am all ears.
 
fontChooser = new FontChooser();                        
                        fontChooser.selectedFont = row.ItemArray[3]; //From dataTable
                        fontChooser.selectedStyle = row.ItemArray[5].ToString().Trim();
                        fontChooser.selectedSize = row.ItemArray[4];
                        fontChooser.selectedWeight = FontWeight.FromOpenTypeWeight( Int32.Parse(row.ItemArray[7].ToString()));
                        fontChooser.Name = "fc_" + row.ItemArray[0].ToString().Trim();
                        fontChooser.SelectionChanged += new SelectionChangedEventHandler(fontChooser_SelectionChanged);
                        grid.RegisterName(fontChooser.Name, fontChooser);
                        grid.Children.Add(fontChooser);
                        Grid.SetRow(fontChooser, i);
                        Grid.SetColumn(fontChooser, 3);
                        Grid.SetColumnSpan(fontChooser, 4);
  
//Event Handler
 void fontChooser_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            FontChooser fc = (e.OriginalSource as FontChooser);
            selectedFont = fc.selectedFont;
            selectedFontStyle = fc.selectedStyle;
            FontWeight weight = (FontWeight)fc.selectedWeight;
            selectedFontWeight = weight;
            Console.Out.WriteLine(fc.Name); //Added to see what is going wrong
            string name = fc.Name.Substring(3);
            activeControl = name;
            string filterExpr = "LABEL_NAME = '" + name + "'";
            DataRow[] rowToUpdate = tempTable.Select(filterExpr);
            int ptr = tempTable.Rows.IndexOf(rowToUpdate[0]);
            DataRow dr = rowToUpdate[0];
            dr[3] = selectedFont;
            if (fc.selectedSize != null
            {
                selectedFontSize = fc.selectedSize;
                dr[4] = selectedFontSize;
            }
            dr[5] = selectedFontStyle;            
            dr[7] = weight.ToOpenTypeWeight();            
            dr.AcceptChanges();
            tempTable.Rows[ptr].BeginEdit();
            tempTable.Rows[ptr].ItemArray = dr.ItemArray;
            tempTable.Rows[ptr].AcceptChanges();
            tempTable.Rows[ptr].EndEdit();
        }

OverCoded
Top achievements
Rank 2
 answered on 05 Aug 2010
2 answers
93 views
Hi,

The SelectionChanged event of RadCarousel works only when the Non-Top item is selected. Is there a event/way to know when the user clicks on the Top item? Currently I'm using the DoubleClicked event to check for the Top item's property, to identify it. But, I want to know whether I can handle it with a single click.

Thanks in advance.
Ela
Ela
Top achievements
Rank 1
 answered on 05 Aug 2010
4 answers
89 views
I have the 2010.2.714.40 demo package and the RadGridView does not have the AutoGenerateHierarchy property.
I am trying to follow this post: http://blogs.telerik.com/RobertShoemate/Posts/09-12-30/techniques_for_creating_a_hierarchical_radgridview_for_winforms.aspx
to reproduce this functionality in a WPF Application.
Thank you.
Charlie
Top achievements
Rank 2
 answered on 05 Aug 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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?