Telerik Forums
UI for WPF Forum
1 answer
91 views
Hi There,
i have placed a button control in the "GridViewScrollViewerTemplate", my question is  how can i listen to click event of that button is there any way that i can do it ?
I have pasted me xaml here please check once.

<ControlTemplate x:Key="GridViewScrollViewerTemplate" TargetType="{x:Type grid:GridViewScrollViewer}">
        <Grid x:Name="PART_RootPanel" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="2" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <ScrollBar x:Name="PART_VerticalScrollBar" Width="18" BorderThickness="1,0,0,0" IsTabStop="False" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="2" Grid.RowSpan="1" Orientation="Vertical" ViewportSize="{TemplateBinding ViewportHeight}" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0.0" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="0,4,0,0"/>
            <ScrollBar x:Name="PART_HorizontalScrollBar" Height="18" BorderThickness="0,1,0,0" IsTabStop="False" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="4" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0.0" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"/>
            <Rectangle Grid.Column="1" Grid.Row="4" Fill="{StaticResource GridView_ScrollViewerIntersectionRectangleBackground}"/>
            <Button HorizontalAlignment="Center" Width="16" Grid.Column="1" Style="{DynamicResource ActionButtonSmallStyle}" Height="16" VerticalAlignment="Center">
                 <Viewbox>
            <Canvas Height="16" Width="16">
                <Path Data="M0,15.16L14.908,15.16L14.908,-0.00100000000000122L0,-0.00100000000000122z" Height="15.161" Canvas.Left="0.25" Stretch="Fill" Canvas.Top="0.249" Width="14.908">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="1.004,0.996" StartPoint="-0.004,0.004">
                            <GradientStop Color="#FF4578AB" Offset="0"/>
                            <GradientStop Color="#FF4578AB" Offset="0.45454400777816772"/>
                            <GradientStop Color="#FF305870" Offset="0.56362897157669067"/>
                            <GradientStop Color="#FF305870" Offset="1"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Path Data="M13.853,14.216L1.018,14.216L1.018,1.162L13.853,1.162z" Height="13.054" Canvas.Left="1.268" Stretch="Fill" Canvas.Top="1.412" Width="12.835">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
                            <GradientStop Color="#FFD2DCEE" Offset="0"/>
                            <GradientStop Color="#FFF6FBF9" Offset="1"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Path Data="M5.74,5.353L2.979,5.353L2.979,2.592L5.74,2.592z" Height="2.761" Canvas.Left="3.229" Stretch="Fill" Canvas.Top="2.842" Width="2.761">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                            <GradientStop Color="#FF708CBC" Offset="0"/>
                            <GradientStop Color="#FF708CBC" Offset="0.45454400777816772"/>
                            <GradientStop Color="#FF4578AB" Offset="0.56362897157669067"/>
                            <GradientStop Color="#FF4578AB" Offset="1"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Path Data="M5.11,4.723L3.608,4.723L3.608,3.221L5.11,3.221z" Height="1.502" Canvas.Left="3.858" Stretch="Fill" Canvas.Top="3.471" Width="1.502">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,-0.001">
                            <GradientStop Color="#FFF6FBF9" Offset="0"/>
                            <GradientStop Color="#FFD2DCEE" Offset="1"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Path Data="F1M3.4604,3.3555L2.9014,3.9155L4.0584,5.3705L4.6544,5.3705L6.1474,2.0865L5.5124,1.4535L4.3554,4.3995z" Fill="#FFAA1E2D" Height="3.917" Canvas.Left="3.151" Stretch="Fill" Canvas.Top="1.704" Width="3.246"/>
                <Path Data="M5.74,9.323L2.979,9.323L2.979,6.563L5.74,6.563z" Height="2.76" Canvas.Left="3.229" Stretch="Fill" Canvas.Top="6.813" Width="2.761">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                            <GradientStop Color="#FF708CBC" Offset="0"/>
                            <GradientStop Color="#FF708CBC" Offset="0.45454400777816772"/>
                            <GradientStop Color="#FF4578AB" Offset="0.56362897157669067"/>
                            <GradientStop Color="#FF4578AB" Offset="1"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Path Data="M5.11,8.694L3.608,8.694L3.608,7.193L5.11,7.193z" Height="1.501" Canvas.Left="3.858" Stretch="Fill" Canvas.Top="7.443" Width="1.502">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFF6FBF9" Offset="0"/>
                            <GradientStop Color="#FFD2DCEE" Offset="1"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Path Data="M5.74,13.319L2.979,13.319L2.979,10.559L5.74,10.559z" Height="2.76" Canvas.Left="3.229" Stretch="Fill" Canvas.Top="10.809" Width="2.761">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                            <GradientStop Color="#FF708CBC" Offset="0"/>
                            <GradientStop Color="#FF708CBC" Offset="0.45454400777816772"/>
                            <GradientStop Color="#FF4578AB" Offset="0.56362897157669067"/>
                            <GradientStop Color="#FF4578AB" Offset="1"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Path Data="M5.11,12.69L3.608,12.69L3.608,11.188L5.11,11.188z" Height="1.502" Canvas.Left="3.858" Stretch="Fill" Canvas.Top="11.438" Width="1.502">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFF6FBF9" Offset="0"/>
                            <GradientStop Color="#FFD2DCEE" Offset="1"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Path Data="F1M11.697,4.989L7.313,4.989L7.313,3.851L11.697,3.851z" Fill="#FFA6A8AB" Height="1.138" Canvas.Left="7.563" Stretch="Fill" Canvas.Top="4.101" Width="4.384"/>
                <Path Data="F1M11.697,8.573L7.313,8.573L7.313,7.435L11.697,7.435z" Fill="#FFA6A8AB" Height="1.138" Canvas.Left="7.563" Stretch="Fill" Canvas.Top="7.685" Width="4.384"/>
                <Path Data="F1M11.697,12.375L7.313,12.375L7.313,11.236L11.697,11.236z" Fill="#FFA6A8AB" Height="1.139" Canvas.Left="7.563" Stretch="Fill" Canvas.Top="11.486" Width="4.384"/>
            </Canvas>
        </Viewbox>
            </Button>
        </Grid>
    </ControlTemplate>

Thanks in Advance,
Srinivas.
Vlad
Telerik team
 answered on 27 Dec 2012
1 answer
108 views
Hi,

I am trying to make the dropdown history list's width match the breadcrumb's one. Which style or container should I overwrite to achieve this? I would like to make the breadcrumb look like the standard windows explorer one.

I suppose it is a matter of replacing a stack panel with a grid somewhere down the line, but I can't figure out where exactly. Any help is much appreciated.

Kind Regards,

Ivan.
Pavel R. Pavlov
Telerik team
 answered on 27 Dec 2012
3 answers
313 views
I've created a project based on your "OrgChart" sample. I'm trying to modify it so that I can see some connectors on the nodes, but I can't figure it out. Also, I need to add the connectors programmatically. How can I accomplish this?

So far I have this (for the shapes in the diagram toolbox). Not sure if this is right...

var shape = new RadDiagramShape();

shape.Geometry = ShapeFactory.GetShapeGeometry(CommonShapeType.RectangleShape);

double offset = 0.25;

foreach (var c in connections)

{

    var connector = new RadDiagramConnector() { Name = name };

    connector.Offset = new Point(1.0, offset);

    offset += 0.25;

    shape.Connectors.Add(connector);

}

var galleryItem = new GalleryItem(displayName, shape, category);

gallery.Items.Add(galleryItem);

Pavel R. Pavlov
Telerik team
 answered on 26 Dec 2012
0 answers
118 views
Hi,
I am facing some problems with Telerik grid view group row styling.
1- I want to show different color for Main group and sub groups.
2 Want to show aggr functions value with columns like group footer. I have to show it on ex-pander only. Currently it is showing in unman-aged way. 
3 I want to remove left most part of ex- pander It looks odd when i apply background color on ex-pander.
Bob
Top achievements
Rank 1
 asked on 26 Dec 2012
1 answer
158 views
Hi
Why the Tile View SelectionChanged not working for me, 
i need an event that fired after the user maximize any tile.

Thanks
Akram
Pavel R. Pavlov
Telerik team
 answered on 26 Dec 2012
1 answer
165 views
Hello,

I am trying to create chart with text labels on X axis. I know about categorical chart, but in my case this is not an option and I'll tell why.
Each of my items has Count filed, CustomDate field and Label field. Count is used for Y axis. CustomDate is integer value and it is used on X axis. Label field is a string that is generated based on CustomDate and I want it to be displayed on X axis ticks, not CustomDate values. I cannot use XCategory to bind to X axis because chart can calculate difference between CustomDate values, i.e. it knows that there is difference of 5 between 5 and 10. But if use XCategory and string field it cannot calculate difference between for example "5" and "10". But this gap between values on X axis is very important.

So, is there is any possibility to use integer values on X axis using XValue, but to display string labels not these integer numbers?  
Missing User
 answered on 25 Dec 2012
1 answer
302 views
Hi
Sometimes i need to use the them colors for border brush, so the color changes if the them changes

Is that possible here?

Thanks,
Akram
Vanya Pavlova
Telerik team
 answered on 25 Dec 2012
1 answer
186 views
Hey,

I am evaluating the telerik chart component (trial version) for its suitability for our software project, and can not bring the RadCartesianChart to work.  

I am trying to put a new view atop of an existing viewmodel, and bind the chart data to a property of type ObeservableCollection<KeyValuePair<int, double>>. When the collection is empty its ok, but when trying to populate it, I get
ArgumentException: Dynamic getter is not supported for value types. 

Any idea why this happens and what the solution is? 

My code: View:
<telerik:RadCartesianChart Grid.Row="1">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
 
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
 
            <telerik:RadCartesianChart.Series>
                <telerik:ScatterLineSeries XValueBinding="Key"
                       YValueBinding="Value"
                       ItemsSource="{Binding Path=DataSeries}">
 
                </telerik:ScatterLineSeries>
            </telerik:RadCartesianChart.Series>
 
        </telerik:RadCartesianChart>

And the view model:
// populated in Constructor
       private ObservableCollection<KeyValuePair<int, double>> mTempRandomData = new ObservableCollection<KeyValuePair<int, double>>();       
 
       private ObservableCollection < KeyValuePair <int, double> > mDataSeries = new ObservableCollection < KeyValuePair < int, double > > ();
 
        public ObservableCollection<KeyValuePair<int, double>> DataSeries
        {
            get { return mDataSeries; }
            set { mDataSeries = value; RaisePropertyChanged ( ()=>DataSeries );
            }
        }
 
        private void DoResetData ( )
        {
            DataSeries = new ObservableCollection < KeyValuePair < int, double > > ();
        }
        private void DoAddRandomData()
        {
            DoResetData (  );            
            DataSeries = mTempRandomData;
             
        }
Petar Marchev
Telerik team
 answered on 25 Dec 2012
3 answers
333 views
Hello

I would like to know if it is possible to use a single data source with the tree list view and describe the self referencing parent-son relationship in the data (ID property and ParentID propert), in opposition to having each node contain a property listing all of its sons.

I managed to do this with the rad grid view, but this is not satisfactory to me, i want to state which objects are root, in the grid view the nodes appear in both the first level and under their parent (I found this to exist in your examples as well), in addition the control operates as a master detail with several levels.

This was actually asked before on this thread:
http://www.telerik.com/community/forums/wpf/treelist/self-reference-with-datatable.aspx

but no actual response was made.

Thanks in advance.
Dimitrina
Telerik team
 answered on 24 Dec 2012
3 answers
123 views
Hi 
I know how to switch themes but the strange thing that the already opened windows does not affected by this line
StyleManager.ApplicationTheme = new Windows8Theme();

Is that true that i can't change the theme for the already opened windows?

Thanks,
Akram
Maya
Telerik team
 answered on 24 Dec 2012
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
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?