Telerik Forums
UI for WPF Forum
2 answers
237 views
I have a pie chart which can display up to 20 slices.  I have to manually set the color for each slice using a converter.

My biggest issue is that the "object value" being passed into the converter isn't the slice datapoint but is the datacontext of the entire chart. Hence, the hard-coded converter parameter (0, 1, ...) so that I know which dataPoint slice is being converted.

So my xaml looks like this (one style per slice (20) which is BAD for maintaining):
<chartView:PieSeries.SliceStyles>
     
    <Style TargetType="Path">
        <Setter Property="Stroke" Value="Gray"/>
        <Setter Property="StrokeThickness" Value="1"/>
        <Setter Property="Fill" Value="{Binding Converter={StaticResource pieChartSliceToColorConverter}, ConverterParameter=0}"/>
         
    </Style>
 
    <Style TargetType="Path">
        <Setter Property="Stroke" Value="Gray"/>
        <Setter Property="StrokeThickness" Value="1"/>
        <Setter Property="Fill" Value="{Binding Converter={StaticResource pieChartSliceToColorConverter}, ConverterParameter=1}"/>
    </Style>

Is there a different style which would eliminate the number of styles I have to maintain?  OR a different approach?

Thanks in advance.

Tracy
Tracy
Top achievements
Rank 1
 answered on 15 Mar 2012
3 answers
121 views
Dear Telerik Team!

I have a RadScheduleView Control in WeekDayView and want to show some AllDayEvents.

The Problem now is, i have defined a Start and Endtime (this is essential for the control)

<scheduleView:RadScheduleView.ViewDefinitions>
                
<scheduleView:WeekViewDefinition VisibleDays="7" Title="Wochenansicht - " FirstDayOfWeek="Monday" TimerulerMajorTickStringFormat="{}{0:HH:mm tt}" MajorTickLength="1h" MinorTickLength="30min" MinTimeRulerExtent="1" DayStartTime="06:00" DayEndTime="20:00" ShowAllDayArea="True"/>
                </scheduleView:RadScheduleView.ViewDefinitions>

So now, when i have some AllDayEvents in the AppointmentSource they will be shown in complete wrong way 
eg.: Allday Event from

08.03.2012 00:00 to 09.03.2012 00:00 will be shown from 07.03 - 08.03 in WeekDayView AllDayArea

when i delete the DayStartTime and DayEndTime Definitions, they will be shown correctly in all Views

is this a known bug ?
I need there some Solution very urgently ... 

regards
Rudi
Boyan
Telerik team
 answered on 15 Mar 2012
1 answer
108 views

Hello Team,

I am trying to
FocusVisualStyle to WPF user controls but I am not able to see the effect. Below is the XAML i am using. Please suggest me any other alternative to change the Boarder thickness.

I need to change focus behavior of the control.

Thanks for your help and support.

Thanks & Regards
Rajesh Penki

<Window x:Class="TelerikIssueApp.MainWindow"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

        Title="MainWindow" Height="350" Width="525"

        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">

    <Grid>       

        <Grid.Resources>

            <Style TargetType="telerik:RadDateTimePicker" x:Key="radDateTimePickerDefaulyStyleNoEnable">

                <Setter Property="telerik:StyleManager.Theme" Value="Summer"></Setter>

                <Setter Property="FontSize" Value="11" />

                <Setter Property="FocusVisualStyle" Value="{DynamicResource AllControlsFocusVisual}"/>

            </Style>

            <Style TargetType="telerik:RadMaskedTextBox" x:Key="radRadMaskedTextBoxDefaulyStyleNoEnable">

                <Setter Property="telerik:StyleManager.Theme" Value="Summer"></Setter>

                <Setter Property="FontSize" Value="11" />

                <Setter Property="FocusVisualStyle" Value="{DynamicResource AllControlsFocusVisual}"/>

            </Style>

            <Style x:Key="AllControlsFocusVisual">

                <Setter Property="Control.Template">

                    <Setter.Value>

                        <ControlTemplate>

                            <Rectangle Stroke="DeepSkyBlue" StrokeThickness="3" Margin="0,0,0,0"/>

                        </ControlTemplate>

                    </Setter.Value>

                </Setter>

            </Style>

        </Grid.Resources>

       

        <Grid.RowDefinitions>

            <RowDefinition Height="30" ></RowDefinition>

            <RowDefinition Height="30" ></RowDefinition>

            <RowDefinition Height="30" ></RowDefinition>

        </Grid.RowDefinitions>       

       

        <telerik:RadDatePicker Style="{StaticResource radDateTimePickerDefaulyStyleNoEnable}"

             Width="180" Height="22" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Grid.Row="0"/>

        <telerik:RadMaskedTextBox   Style="{StaticResource radRadMaskedTextBoxDefaulyStyleNoEnable}"

            Width="180" Height="22" HorizontalAlignment="Left"  
            
HorizontalContentAlignment="Left" Grid.Row="1"/>       

    </Grid>

</Window>

 

 

Yana
Telerik team
 answered on 15 Mar 2012
1 answer
158 views
Hello,
I am using Telerik version 2012.1
What I am trying to do is to build a chart with a single source of data. But the source, the chart type, and the color should be able to be selected in drop down comboboxes. I am having trouble figuring out how to get the color set, don't know if it is because I have a generic chart in the XAML and am setting the series definition in an attached property, or if there is another reason. Below is a sample of my code, let me know if you need more. Thank you,

Eli

        <charting:RadChart Grid.Row="3"<br>                           PaletteBrushesUseSolidColors="True"<br>                           Name="lineChart"><br>          <br>            <attached:SeriesMapper.BindingInfo><br>                <attached:SeriesBindingInfo DataTable="{Binding DataTable}"<br>                                            EmissionsTemplate="{Binding Template}" /><br>            </attached:SeriesMapper.BindingInfo><br><br>            <charting:RadChart.DefaultView><br>                <Charting:ChartDefaultView><br>                    <Charting:ChartDefaultView.ChartLegend><br>                        <Charting:ChartLegend Name="legend3" /><br>                    </Charting:ChartDefaultView.ChartLegend><br>                    <Charting:ChartDefaultView.ChartArea><br>                        <Charting:ChartArea LegendName="legend3"<br>                                            Legend="{Binding Template.CurrentTemplate}"><br>                            <Charting:ChartArea.ZoomScrollSettingsX><br>                                <Charting:ZoomScrollSettings ScrollMode="ScrollAndZoom"<br>                                                             MinZoomRange=".005" /><br>                            </Charting:ChartArea.ZoomScrollSettingsX><br><br>                            <Charting:ChartArea.AxisX><br>                                <Charting:AxisX DefaultLabelFormat="{Binding AxisXLabelFormat}"<br>                                                LabelStep="12"<br>                                                Title="Date"<br>                                                LayoutMode="Between" /><br>                            </Charting:ChartArea.AxisX><br>                            <Charting:ChartArea.AxisY><br>                                <Charting:AxisY AutoRange="True"<br>                                                Title="{Binding Template.SelectedYColumn.Alias}"<br>                                                ExtendDirection="None" /><br>                            </Charting:ChartArea.AxisY><br>                        </Charting:ChartArea><br>                    </Charting:ChartDefaultView.ChartArea><br>                </Charting:ChartDefaultView><br>            </charting:RadChart.DefaultView><br>        </charting:RadChart>

<br>        private static SeriesDefinition CreateSeriesDefinition(string seriesType)<br>        {<br>            SeriesDefinition series = null;<br><br>            switch (seriesType)<br>            {<br>                case "Line":<br>                    series = CreateLineSeriesDefinition();<br>                    break;<br>                case "Scatter":<br>                    series = CreateScatterSeriesDefinition();<br>                    break;<br>                case "Spline":<br>                    series = CreateSplineSeriesDefinition();<br>                    break;<br>            }<br><br>            series.Appearance.Foreground = new SolidColorBrush(SystemColors.ControlDarkColor);<br>            return series;<br>        }
Sia
Telerik team
 answered on 15 Mar 2012
2 answers
426 views
I have a page with a telerik RadGridView and a couple of buttons.  I'd like clicking the buttons to select the previous/next rows from the grid.  So I'm trying out RadGridViewCommands from the button's Click events:

private void prevButton_Click(object sender, RoutedEventArgs e)
{
    var cmd = RadGridViewCommands.MovePrevious as RoutedUICommand;
    cmd.Execute(null, myGrid);
}

The various move commands change the focus, but they do not change the selected row.

I've tried MoveUp, followed by SelectCurrentItem, but that doesn't seem to change the selection at all.

Ideas?
Jeff
Top achievements
Rank 1
 answered on 15 Mar 2012
6 answers
404 views
This has probably been asked / answer previously - I couldn't find what I was looking for in my searches, though.

I've got a WPF RadTreeView set up, on WPF 4, with the last 2010 release of the Telerik WPF 4 controls. I've enabled drag & drop within my Treeview, and I am able to correctly drag the selected object (an "Equipment" class) within my treeview.

I've looked at the sample apps that show how to drag an item from a RadTreeview to a Textbox and set up everything correctly, according to the sample. Dragging a basic piece of text, like the example shows, works. However, dragging my Equipment class from the treeview to the Textbox (a standard WPF textbox) does not work. It constantly tells me that the drop is not allowed, even though I've implemented the DragQuery event and set e.QueryResults = true

any tips, tricks, or tutorials to help me get my situation working?
Petar Mladenov
Telerik team
 answered on 15 Mar 2012
4 answers
349 views
Hi!

Maybe its better i start a new Thread for this.
I reffer to this old Topic: http://www.telerik.com/community/forums/wpf/gridview/need-to-change-background-color-of-a-row-based-on-a-condition.aspx

i'am using the StyleSelector to change the background of an GridViewRow in runtime. But i also want to implement an AlternateRowBackground, but - as Tony in the other Topic said - when i set the AlternateRowBackground and AlternationCount-Property in my Grid the StyleSelector doesnt work.
I don't want to create two different Styles for normal Rows and AlternateRows.
Is it possible to set both, RowStyleSelector and AlternateRowBackground or is their a way to implement the AlternateRowBackground in my StyleSelctor? Can i differ if the call comes from the AlternateStyleSelctor or from the RowStyleSelector?


Thank you for your help
Alex
Alexander
Top achievements
Rank 1
 answered on 15 Mar 2012
1 answer
177 views
When I open Backstage in - let say - Word, I can (at once) navigate with the arrow and tabkeys.
I can navigate to buttons like Close and Save and then use the enter-key to execute the methods.
I try to do the same in the RadViews backstage, but it won't work.
How could I get this expected behavior in this backstage?
I tried IsSelectable, IsStapstop and more, but could not get i right.
The keyboardnavigation in Telerik example of the BackStage (Telerik editor) does not work either.

<telerik:RadRibbonBackstage>
<telerik:RadRibbonBackstageItem Header="Modules" IsDefault="true">
<Grid>
....
</Grid>
</telerik:RadRibbonBackstageItem>

<telerik:RadRibbonBackstageItem Header="Setup">
<Grid>
....
</Grid>
</telerik:RadRibbonBackstageItem>

<telerik:RadRibbonBackstageItem CloseOnClick="True" Header="Open" Icon="open.png" Click="OpenClick" />
<telerik:RadRibbonBackstageItem CloseOnClick="True" Header="Edit"    Icon="edit.png" Click="EditClick" />
<telerik:RadRibbonBackstageItem CloseOnClick="True" Header="Save"  Icon="save.png" Click="SaveClick" />

<telerik:RadRibbonBackstageItem IsGroupSeparator="True"/>

<telerik:RadRibbonBackstageItem CloseOnClick="True" Header="Close" Icon="close.png" Click="CloseClick" />

</telerik:RadRibbonBackstage>

Viktor Tsvetkov
Telerik team
 answered on 15 Mar 2012
1 answer
159 views
Hi,

I use Telerik V2010.3.1314.35

I have a TabControl with 2 TabItems, the first one contain a text and the second one contain  RadCarousel with 3 images. Of course, the default TabItme is the first one (the one who contain the text). When I star my application, I add my text to my first TabItem and I add my 3 images into my carousel. After adding my images to my carousel, I do the following:

carousel.BringDataItemIntoView(carousel.Items[0]);

After finishing reading my text, I click on my second tab to see the first image of my carousel and it's not there, I have to click on the carousel navigation button to see my images...

xaml:
                                    <telerik:RadCarousel Background="Transparent" ToolTip="{StaticResource ObtainCarouselFullscreen}" Name="SignCtxDocsCarousel" MouseRightButtonDown="SignCtxDocsCarousel_MouseRightButtonDown" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden" IsSynchronizedWithCurrentItem="True">
                                                <telerik:RadCarousel.ItemsPanel>
                                                    <ItemsPanelTemplate>
                                                        <telerik:RadCarouselPanel Path="{StaticResource horizontalPath}"/>
                                                    </ItemsPanelTemplate>
                                                </telerik:RadCarousel.ItemsPanel>
                                            </telerik:RadCarousel>

code:
-------

carousel.Items.Add(img);

if

 

(carousel.Items.Count > 0)

 

{

carousel.BringDataItemIntoView(carousel.Items[0]);


}


Thank's
Dimitrina
Telerik team
 answered on 15 Mar 2012
1 answer
97 views
Is there a way to prevent the panelbaritem from collapsing.... or better yet.  to stop all the panelbaritems inside of a panelbar from collapsing ?
Petar Mladenov
Telerik team
 answered on 15 Mar 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?