Telerik Forums
UI for WPF Forum
2 answers
119 views
Good morning, in my project I have to refer marked zone annotations to a secondary Y axes, but it does not seem to work.
Project involves complex logic with the MVVM pattern, in order to try to understand what is going on I made up a simple example (below), but still does not work. Marked zone annotation must be referred to secondary Y Axes, called "Height", but still refers to the primary one.
Please tell me what am I missing,
   Paolo



<telerikChart:RadChart x:Name="radChart">
                <telerikChart:RadChart.DefaultView>
                    <telerikCharting:ChartDefaultView>
                        <telerikCharting:ChartDefaultView.ChartLegend>
                            <telerikCharting:ChartLegend x:Name="chartLegend2" Header="Legend" UseAutoGeneratedItems="True" Visibility="Collapsed"/>
                        </telerikCharting:ChartDefaultView.ChartLegend>
                        <telerikCharting:ChartDefaultView.ChartArea>
                            <telerikCharting:ChartArea LegendName="chartLegend">
                                <telerikCharting:ChartArea.AxisX>
                                    <telerikCharting:AxisX
                                        AutoRange="False"
                                        MajorGridLinesVisibility="Visible"
                                        MinValue="0"
                                        MaxValue="20"
                                        Step="2"
                                        ></telerikCharting:AxisX>
                                </telerikCharting:ChartArea.AxisX>
                                <telerikCharting:ChartArea.AxisY>
                                    <telerikCharting:AxisY
                                        AutoRange="False"
                                        MinorGridLinesVisibility="Hidden"
                                        MajorGridLinesVisibility="Visible"
                                        MinorTicksVisibility="Hidden"
                                        StripLinesVisibility="Hidden"
                                        MinValue="0"
                                        MaxValue="1000"
                                        Step="100"
                                        >
                                    </telerikCharting:AxisY>
                                </telerikCharting:ChartArea.AxisY>
                                <telerikCharting:ChartArea.AdditionalYAxes>
                                    <telerikCharting:AxisY x:Name="Height"
                                                                AutoRange="False"
                                                                MinValue="0"
                                                                MaxValue="10"
                                                                Step="1"
                                                                MinorTicksVisibility="Hidden"
                                                                Visibility="Visible"
                                                                >
                                    </telerikCharting:AxisY>
                                </telerikCharting:ChartArea.AdditionalYAxes>
                                
                                <telerikCharting:ChartArea.Annotations>
                                    <telerikCharting:MarkedZone
                                        YAxisName="Height"
                                        StartX="6"
                                        EndX="8"
                                        StartY="3"
                                        EndY="7"
                                        Background="Orange"
                                        >
                                    </telerikCharting:MarkedZone>
                                </telerikCharting:ChartArea.Annotations>
                                
                                <telerikCharting:ChartArea.DataSeries>
                                    <!-- Line Chart -->
                                    <telerikCharting:DataSeries LegendLabel="Product Sales">
                                        <telerikCharting:DataSeries.Definition>
                                            <telerikCharting:LineSeriesDefinition>
                                            </telerikCharting:LineSeriesDefinition>
                                        </telerikCharting:DataSeries.Definition>
                                        <telerikCharting:DataPoint YValue="112" XValue="0"/>
                                        <telerikCharting:DataPoint YValue="257" XValue="2"/>
                                        <telerikCharting:DataPoint YValue="450" XValue="4"/>
                                        <telerikCharting:DataPoint YValue="800" XValue="6"/>
                                        <telerikCharting:DataPoint YValue="467" XValue="8"/>
                                        <telerikCharting:DataPoint YValue="469" XValue="10"/>
                                        <telerikCharting:DataPoint YValue="540" XValue="12"/>
                                        <telerikCharting:DataPoint YValue="560" XValue="14"/>
                                        <telerikCharting:DataPoint YValue="500" XValue="16"/>
                                        <telerikCharting:DataPoint YValue="235" XValue="18"/>
                                        <telerikCharting:DataPoint YValue="76"  XValue="20"/>
                                    </telerikCharting:DataSeries>
                                </telerikCharting:ChartArea.DataSeries>
                            </telerikCharting:ChartArea>
                        </telerikCharting:ChartDefaultView.ChartArea>
                    </telerikCharting:ChartDefaultView>
                </telerikChart:RadChart.DefaultView>
            </telerikChart:RadChart>
Paolo
Top achievements
Rank 1
 answered on 06 Mar 2013
13 answers
220 views
Hi,

I am trying to implement the new ColumnGroups introduced in the latest version (2011 Q3) but I am having issues when trying to create the ColumnGroups by code.

The problem occurs when trying to construct ColumnGroups with the below code. (taken from a simple sample to isolate the issue)
            this.grid.Columns.Clear();
            this.grid.ColumnGroups.Clear();
            var gridColumn = new GridViewDataColumn();
            var gridColumn2 = new GridViewDataColumn();
            if (this.IncludeGroup.IsChecked != null && (bool)this.IncludeGroup.IsChecked)
            {
                this.grid.ColumnGroups.Add(new GridViewColumnGroup
                    {
                        Name = "A",
                        Header = "A"
                    });
                this.grid.ColumnGroups.Add(new GridViewColumnGroup
                {
                    Name = "B",
                    Header = "B"
                });

                gridColumn.ColumnGroupName = "A";
                gridColumn2.ColumnGroupName = "B";
            }

            gridColumn.UniqueName = "a";
            gridColumn.Header = "Name";
            var textBinding = new Binding("Name");
            textBinding.Mode = BindingMode.OneWay;
            gridColumn.DataMemberBinding = textBinding;
            this.grid.Columns.Add(gridColumn);
            
            gridColumn2.UniqueName = "b";
            gridColumn2.Header = "Name";
            var textBinding2 = new Binding("Year");
            textBinding2.Mode = BindingMode.OneWay;
            gridColumn2.DataMemberBinding = textBinding2;
            this.grid.Columns.Add(gridColumn2);
It will refresh the whole GridView correctly except for the ColumnGroups.

Any help would be much appreciated,
Rich
Maya
Telerik team
 answered on 06 Mar 2013
3 answers
108 views
Hi,

I am using the following to define a GridView Column

<telerik:GridViewDataColumn 
DataMemberBinding="{Binding IsSelected}"
        IsFilterable="False"
        Header="">
        <telerik:GridViewDataColumn.CellTemplate>
            <DataTemplate>
                <CheckBox  IsChecked="{Binding IsSelected, Mode=TwoWay}" 
                           Checked="IsSelected_Checked" 
                           Unchecked="IsSelected_Unchecked"/>
                 </DataTemplate>
        </telerik:GridViewDataColumn.CellTemplate>

</telerik:GridViewDataColumn>

The default theme and the Windows7 theme works as expected but the Windows8Theme has the following behavior. I have to hit the screen to the right of the checkbox to check the item and when I put the mouse directly on the checkbox I get the sizing icon.  I assume it has something to due with the fact that the CheckBox is a Windows control?

I originally defined the column as telerik:GridViewCheckBoxColumn but that did not provide me with Checked and Unchecked events.  I then went to the above code which I got from the forum.  It seems to me that the telerik:GridViewCheckBoxColumn should provide the checked events otherwise why have it?  When and  if its decided to make a change to telerik:GridViewCheckBoxColumn for the checked events I would also suggest that you provide a property to not dim the checkbox whether the row is selected or not.  

Thanks
Rich


:
Maya
Telerik team
 answered on 06 Mar 2013
11 answers
303 views
Hi,

Summary:
How can I customize the interval formatter for hours to display 24-hour time?

Background:
I've found the default interval formatters detailed here:
http://www.telerik.com/help/wpf/radtimebar-intervals-formatters.html

I have my Windows regional settings set to 24-hour time (without any suffix) and what I'm finding is that the hour interval for the RadTimeBar is displaying in 12-hour time, however without any suffix, presumably because Windows regional settings do not specify a suffix when set to displaying 24-hour time. This makes it a little more ambiguous for the user who is expecting 24-hour time, however gets 12-hour time instead.

How can I customize the interval formatter for hours to display 24-hour time?

Kind regards,
Dave.
John Tobin
Top achievements
Rank 1
 answered on 05 Mar 2013
3 answers
128 views

Upgrading to the latest Telerik release results in a NullReferenceException in Caliburn Micro ActionMessage.SetMethodBinding on application load.  The issue is specific to the ExecuteOnLoad event handler Sequence which tries to resolve bindings for the control that is loading. 

In our case, the control is a RadButton.  The Exception is thrown when the Source property of the ActionExecutionContext in Caliburn Micro is dereferenced.  The Source property is set to the value of the ActionMessage’s AssociatedObject property when the object is constructed a few frames higher on the call stack.
  

For some reason, the AssociatedObject property is set correctly with the Button controls in the prior telerik release, but not with this latest one.

Additionally, this problem is specific to Caliburn Micro Actions set up in Styles vs. on the control itself.  IOW this code causes the exception:

        <Style x:Key="FooStyle" TargetType="telerik:RadButton"> 
          <Setter Property="ToolTip" Value="Foo Tip"/>  
          <Setter Property="cal:Message.Attach" Value="[Click]=[Foo]"/> 
        </Style>
        <telerik:RadButton x:Name="_fooButton" Style="{StaticResource FooStyle}"/> 

While this code does not
        <Style x:Key="FooStyle" TargetType="telerik:RadButton">
          <Setter Property="ToolTip" Value="Foo Tip"/>  
        </Style>
        <telerik:RadButton x:Name="_fooButton" 
                           Style="{StaticResource FooStyle}" 
                          cal:Message.Attach = "[Click]=[Foo]"/> 

Again, setting the Message.Attach property in a style worked fine in the last Telerik release.  It causes an exception in this latest release.


We have many buttons in our application that are styled like this and it will be a large effort to convert them as a workaround in order to use the latest Telerik controls.  Before we do so, we’d like to know what changed and whether there is a less invasive workaround.

Tina Stancheva
Telerik team
 answered on 05 Mar 2013
2 answers
96 views
I want tab controls to go vertically up the lefthand side.  But what is happening is space is always allocated in the grid for if it where horizontal and then the ViewModel name is shown in the Grid.  I have looked at there is nothing else being render in that column of hte control.  So I don't know how to refresh the screen after the tabcontrol has went verical and get rid of the viewmodel name being displayed.

Here is XAML

<Border Grid.Row="1" telerikControls:StyleManager.Theme="Expression_Dark">
            <Grid>
            	<!--<Grid.Effect>
            		<DropShadowEffect BlurRadius="10" Color="Black"/>
            	</Grid.Effect>-->
 
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <telerik:RadTabControl x:Name="tabDisplays" Grid.Column="0" TabOrientation="Horizontal"
                                       TabStripPlacement="Left" Align="Right"
                                       telerikControls:StyleManager.Theme="Expression_Dark"
                                       ItemsSource="{Binding Path=DisplayTabs}" SelectionChanged="RadTabControl_SelectionChanged_1">
                    <telerik:RadTabControl.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Name}" />
                        </DataTemplate>

Code behind
this.DataContext = new MainWindowViewModel();

heavywoody
Top achievements
Rank 1
 answered on 05 Mar 2013
9 answers
152 views
I like the Windows8Theme.  But when I tried to type in Windows8Theme(), it cannot found and compiled it in WPF application.  But all the other themes are working properly.

 

 

StyleManager.ApplicationTheme = new Office_BlackTheme();

 

Dimitrina
Telerik team
 answered on 05 Mar 2013
1 answer
125 views
Hi

I am using the richtextbox to display email content (html) that i have downloaded from exchange via the exchange web api.

This fails to show images as the images are in the following format - is their anyway i can hook into the richtextbox and resolve these images (i can get them from exchange and save them to local disk or stream)



<img width="387" height="164" id="Picture_x0020_3" src="cid:image001.png@01CE15AF.A375F5C0">
RICHARD FRIEND
Top achievements
Rank 2
 answered on 05 Mar 2013
3 answers
59 views
I have a SemicircleWestScale and I am attempting to use a custom item for a marker.  I also have a coupld of ranges setup.  The background is set to an imagebrush.  The custom item is showing behind the background range.  What needs to change to get the custom item to the foreground. 

Thanks,

Joe

<telerik:SemicircleWestScale.Ranges>
                            <telerik:GaugeRange Min="0" Max="100">
                                <telerik:GaugeRange.Background>
                                    <ImageBrush ImageSource="pack://siteoforigin:,,,/Resources/radiation_scale.png"/>
                                </telerik:GaugeRange.Background>
                            </telerik:GaugeRange>
                            <telerik:GaugeRange Min="20" Max="80" >
                                <telerik:GaugeRange.Background>
                                    <ImageBrush ImageSource="pack://siteoforigin:,,,/Resources/radiation_scale_green.png"/>
                                </telerik:GaugeRange.Background>
                            </telerik:GaugeRange>
                        </telerik:SemicircleWestScale.Ranges>
                        <telerik:SemicircleWestScale.CustomItems>
                            <Image  telerik:ScaleObject.Value="{Binding Data.Value, UpdateSourceTrigger=PropertyChanged}" Source="pack://siteoforigin:,,,/Resources/radiation_marker.png" IsHitTestVisible="False" />
                        </telerik:SemicircleWestScale.CustomItems>
Andrey
Telerik team
 answered on 05 Mar 2013
4 answers
808 views
A combobox in my gridview needs to have different ItemsSource depending on the value of another column.
I've tried to solve this by listening on the gridview's PreparingCellForEdit event:
private void RadGridView_PreparingCellForEdit(object sender, GridViewPreparingCellForEditEventArgs e)  
{  
    switch (e.column.Name) 
    
        case "MyDynamicColumn"
            var combobox = e.EditingElement as RadComboBox;  
            combobox.ItemsSource = List<string> { "1", "2", "3" }; //TODO: Replace with some dynamic business logic here  
            combobox.SetBinding(RadComboBox.SelectedValueProperty, "MyComboValue");   
            break
        
    
}

...and this kind-of works. The combobox displays its SelectedValue once it is selected and the dropdown shows the correct list of values.

However, when the combobox is not in edit-mode, it looks empty. I'd like to bind a TextBlock with the SelectedValue for display, but don't know how to accomplish that.

Any thoughts would be appreciated.
Yoan
Telerik team
 answered on 05 Mar 2013
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?