Telerik Forums
UI for WPF Forum
5 answers
129 views
Hi,

I'am trying to position the Chart Titles into the ChartPlotArea.
That's all well and good, but if i'm setting the Background Color of the PlotArea differently than the Background of the ChartArea the PlotArea hides the ChartTitle.
Setting a ZIndex for the PlotArea and the Title dosn't work.
Picture without setting a special background color
Picture with setting a special background color

Here is my Code:
<UserControl.Resources>
    <Style x:Key="XTitleStyle" TargetType="{x:Type telerik:AxisTitle}">
        <Setter Property="Margin" Value="0,-32,1,0"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="Panel.ZIndex" Value="10"/>
    </Style>
 
    <Style x:Key="Y1TitleStyle" TargetType="{x:Type telerik:AxisTitle}">
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <TranslateTransform X="-5" Y="-80"/>
                    <RotateTransform Angle="90"/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>
     
    <Style TargetType="{x:Type telerik:MarkedZone}">
        <Setter Property="Panel.ZIndex" Value="-1"/>
    </Style>
 
</UserControl.Resources>
 
<Grid Width="Auto" Height="Auto">
    <telerik:RadChart HorizontalAlignment="Stretch" Margin="10,5,10,5" Name="radChart1" VerticalAlignment="Stretch" BorderThickness="0" Background="{DynamicResource backgroundTabControl}">
 
        <telerik:RadChart.SeriesMappings>
 
            <telerik:SeriesMapping ItemsSource="{Binding Series1, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" >
                <telerik:SeriesMapping.SeriesDefinition>
                    <telerik:LineSeriesDefinition ShowItemLabels="False" ShowPointMarks="False">
                        <telerik:LineSeriesDefinition.Appearance>
                            <telerik:SeriesAppearanceSettings StrokeThickness="1.5"/>
                        </telerik:LineSeriesDefinition.Appearance>
                    </telerik:LineSeriesDefinition>
                </telerik:SeriesMapping.SeriesDefinition>
                <telerik:SeriesMapping.ItemMappings>
                    <telerik:ItemMapping FieldName="Y" DataPointMember="YValue"/>
                </telerik:SeriesMapping.ItemMappings>
            </telerik:SeriesMapping>
        </telerik:RadChart.SeriesMappings>
 
        <telerik:RadChart.DefaultView>
            <telerik:ChartDefaultView ChartLegend="{x:Null}">
                <telerik:ChartDefaultView.ChartArea>
                     
                    <telerik:ChartArea EnableAnimations="False" EnableStripLinesAnimation="False" SnapsToDevicePixels="True">
                    <!-- Here I'm setting the Background with PlotAreaStyle-->
                        <telerik:ChartArea.PlotAreaStyle>
                            <Style TargetType="{x:Type telerik:ClipPanel}">
                                <Setter Property="Background" Value="White"/>
                                <Setter Property="Panel.ZIndex" Value="-1"/>
                            </Style>
                        </telerik:ChartArea.PlotAreaStyle>
                         
                        <!-- Here I'm setting the Background with a MarkedZone-->
                        <telerik:ChartArea.Annotations>
                            <telerik:MarkedZone Background="White"  />
                        </telerik:ChartArea.Annotations>
                         
                        <telerik:ChartArea.AxisX>
                            <telerik:AxisX AutoRange="False" MajorGridLinesVisibility="Visible" MajorTicksVisibility="Visible" Title="test">
                                <telerik:AxisX.AxisStyles>
                                    <telerik:AxisStyles TitleStyle="{StaticResource XTitleStyle}" />
                                </telerik:AxisX.AxisStyles>
                            </telerik:AxisX>
                        </telerik:ChartArea.AxisX>
                        <telerik:ChartArea.AxisY>
                            <telerik:AxisY AutoRange="False" MajorGridLinesVisibility="Visible" MinorGridLinesVisibility="Collapsed" Title="test" PlotAreaAxisVisibility="Visible" StripLinesVisibility="Collapsed">
                                <telerik:AxisY.AxisStyles>
                                    <telerik:AxisStyles TitleStyle="{StaticResource Y1TitleStyle}"/>
                                </telerik:AxisY.AxisStyles>
                            </telerik:AxisY>
                        </telerik:ChartArea.AxisY>
                    </telerik:ChartArea>
                </telerik:ChartDefaultView.ChartArea>
            </telerik:ChartDefaultView>
        </telerik:RadChart.DefaultView>
    </telerik:RadChart>
</Grid>

I would like to display the AxisTitle above the PlotArea and above any MarkedZones. Is there any solution?

Best regards
Dominik
Evgenia
Telerik team
 answered on 09 Jun 2011
1 answer
83 views
Hello,

I am displaying a couple of sparkline graphs.  The underlying data is a List<KeyValuePair<Int32, Int32>>.  The sparkline seems to be automatically sorting and displaying the data by the key.  (I'm basically displaying a count by month, the left most point needs to be current month)

Is there any way to display the data how it's layed out in the collection itself?
Vladimir Milev
Telerik team
 answered on 09 Jun 2011
1 answer
119 views
Hi,

I have a quick question can i use 2d range bar as stacked bar (Horizontal). if yes can you please send the sample project.

thanks
sarag.
Nikolay
Telerik team
 answered on 09 Jun 2011
0 answers
90 views
Hello Team,

Here we have a Telerik gridview and around 25 no. of columns is there. The problem is when we view Print Preview the output appears but not exactly what we expected. The 1st page take few columns and the rest goes to 2nd page and rest one goes to 3rd page but if we have 4 rows in a grid along with 25 columns, then the result must appear on the same page after the first best fit columns on the same page. 

Please see below the logic of Print Preview-

public
static void PrintPreview(GridViewDataControl source, bool modal)
        {
            var window = new Window { Title = "Print Preview" };
            var dialog = new PrintDialog();
            var document = source.ToPrintFriendly().ToFixedDocument(dialog);
            var documentViewer = new DocumentViewer
            {
                Document = document
            };
            window.Content = documentViewer;
            if (modal)
                window.ShowDialog();
            else
                window.Show();
        }

I have tried the given link in the forum and customise the logic but no luck to achieved what we expected as a output-
Here's link- http://www.telerik.com/community/code-library/wpf/gridview/radgridview-print-and-print-preview.aspx

Kindly help me out to over come this issue.

Regards,
Naren



  
Narendra
Top achievements
Rank 1
 asked on 09 Jun 2011
6 answers
470 views
Hi,
I am using a treeview in tri state mode. Initially the treeview is is collapsed mode. When I click and check on a collapsed parent node, its child nodes never gets checked automatically.
Once the parent node is expanded (and even if its collapsed then) and I check this node, its children are checked properly.

My requirement is to have all the nodes initially collapsed to parent level, when I check/uncheck a parent node, the node should expand and its children should get checked automatically.

Here is my markup for the treeview
<telerikNavigation:RadTreeView  Grid.Column="0" Grid.Row="0" x:Name="rdTreeView" ItemsOptionListType="CheckList" DockPanel.Dock="Bottom"
                    IsOptionElementsEnabled="True" IsRootLinesEnabled="True"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
                    IsTriStateMode="True" Telerik:StyleManager.Theme="Office_Blue"
                    IsLineEnabled="True" IsEditable="True" Background="White" Margin="0,0,0,0" SelectionMode="Single"
                    IsExpandOnSingleClickEnabled="True" IsExpandOnDblClickEnabled="False"
                   BringIntoViewMode="HeaderAndItems" ItemContainerStyle="{StaticResource ItemContainerStyle}"
                    IsLoadOnDemandEnabled="False" IsVirtualizing="True"  telerikTreeView:TreeViewPanel.VirtualizationMode="Hierarchical"
                    Checked="rdTreeView_Checked" Unchecked="rdTreeView_Unchecked">
                    </telerikNavigation:RadTreeView>


Is there something I am missing? Please help.

Thanks
Tina Stancheva
Telerik team
 answered on 08 Jun 2011
1 answer
90 views
Hi,
I am having trouble getting the TileView to synchronize its maximized item with the current item from the ItemSource. I eventually got this to work by handling the appropriate event handlers but I'm wondering if there's something that I am doing wrong because it would certainly be much cleaner if I didn't have to do this. Here is how my control is defined:

 

<telerik:RadTileView
    x:Name="PART_TileView"
    ContentTemplate="{StaticResource ImageTileViewContentTemplate}"
    ItemsSource="{Binding Source={x:Static localdata:Image.ImageCollectionView}}"
    IsItemDraggingEnabled="False"
    IsSynchronizedWithCurrentItem="True"
    IsTextSearchEnabled="True"
    IsVirtualizing="True"
    ItemTemplate="{StaticResource ImageTileViewItemTemplate}"
    MinimizedColumnWidth="140"
    MinimizedItemsPosition="Right"
    MinimizedRowHeight="140"
    MaximizeMode="ZeroOrOne"
    TileStateChangeTrigger="SingleClick"
    TileStateChanged="RadTileView_TileStateChanged"
>
</telerik:RadTileView>

 

 

  

 

Thank you in advance for your excellent support.
Pete 

PS: I ran into a similar problem using the GridView when I bound 'ItemSource' to a collection. For that control I got the 'IsSynchronizedWithCurrentItem' behavior (thanks to your help) by binding to a collection view but that same trick isn't working for the TileView.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Zarko
Telerik team
 answered on 08 Jun 2011
4 answers
156 views
I have a tab control that has several tabs. each tab has a user control. All of the user controls are bound to an EF entity via viewModel binding. I've implemented some custom validation to my EF entity using IDataErrorInfo.

The main control is databound to master viewModel. Each child user control (which represents the contents of a tab) has its datacontext set to a property on the master viewModel (these properties are child viewmodels). These child VM are being instantiated once the master gets the entity from EF.

When I create a new tab control (for an entity), when it initially displays on the screen all my controls that are validation aware show the red outline I've defined for all properties that are required. But if I switch to a different tab then come back, the outlines are gone even though the value still doesn't pass validation. How do I fix this?

Is it in the way I have my UI designed? I can change it if needed, just not sure how.
Rayne
Top achievements
Rank 1
 answered on 08 Jun 2011
1 answer
127 views

Hi,

I'm using "PreservePositionWhenMaximized=True" in TileView.
Exception always occurs OnPropertyChanged when there is TileView item with Maximized state
But, no exception occurs OnPropertyChanged when  there isn't TileView item with Maximized state

  

what's the problem?

 

environment
telerik.windows.controls 2010.3.1314.40
visualstudio 2010
.net framework 4.0.303019
Win2003 SE SP2

StackTrace

at Telerik.Windows.Controls.RadTileView.ChangePosition(RadTileViewItem item, 
Int32 oldValue, Int32 newValue) in 
c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TileView\RadTileView.cs:line 
398<BR>   at 
Telerik.Windows.Controls.RadTileViewItem.OnPositionChanged(DependencyObject d, 
DependencyPropertyChangedEventArgs e) in 
c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TileView\RadTileViewItem.cs:line 
436<BR>   at 
System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs 
e)<BR>   at 
System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs 
e)<BR>   at 
System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs 
args)<BR>   at 
System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, 
DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, 
EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean 
coerceWithCurrentValue, OperationType operationType)<BR>   at 
System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object 
value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean 
coerceWithCurrentValue, OperationType operationType, Boolean 
isInternal)<BR>   at 
System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object 
value)<BR>   at 

   

Zarko
Telerik team
 answered on 08 Jun 2011
10 answers
749 views
Lets say I have two columns in my data grid, Column A is a checkbox, and column B is text. I want to set the color of the text in Column B as Red, if the check box in the corresponding row is checked, and if not checked set the color to Black.

I want to do it through XAML. Can anyone provide me an example of how to do this?
Apoorva
Top achievements
Rank 1
 answered on 08 Jun 2011
3 answers
73 views
I have a WPF RadGridView with an associated ExportTelerikGridDataUserControl.
Using da-DK culture the XML export shows up in Excell with no decimals on numbers. I can solve this problem by using en-US culture but that has other implications that I cannot accept.
What can I do ?
Maya
Telerik team
 answered on 08 Jun 2011
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
VirtualKeyboard
HighlightTextBlock
Security
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?