Telerik Forums
UI for WPF Forum
1 answer
166 views
Hello, I'm working on a WPF application that contains several controls, including a RadDiagram. On some RadDiagramShape I applied a style which refer a DataTemplate, defined as follows:

<DataTemplate x:Key="AttributeContentTemplate">
            <Grid>
                <Canvas ClipToBounds="False">
                    <TextBlock  Text="{Binding Name}" 
                               FontWeight="{Binding IsBoldText,Converter={StaticResource FontWeightBooleanConverter}}"
                               FontStyle="{Binding IsItalicText,Converter={StaticResource FontStyleBooleanConverter}}">                       
                    </TextBlock>
                </Canvas>
            </Grid>
        </DataTemplate>

Every binding worked properly until I applied an ApplicationTheme after main form initialization using StyleManager: 

StyleManager.ApplicationTheme = new Windows8Theme();

after that FontWeight and FontStyle bindings won't work, even if I set those bindings in code.

how I can fix it?





Martin Ivanov
Telerik team
 answered on 17 Feb 2014
1 answer
473 views
When double touching on a row the mousedoubleclick event is not fired. Do I have to configure anything to support this scenario?

Also the following error is shown in the output window:

System.Windows.Media.Animation Warning: 6 : Unable to perform action because the specified Storyboard was never applied to this object for interactive control.; Action='Remove'; Storyboard='System.Windows.Media.Animation.Storyboard'; Storyboard.HashCode='61706161'; Storyboard.Type='System.Windows.Media.Animation.Storyboard'; TargetElement='System.Windows.Media.Animation.Storyboard'; TargetElement.HashCode='61706161'; TargetElement.Type='System.Windows.Media.Animation.Storyboard'

Best regards,
Roland
Nick
Telerik team
 answered on 17 Feb 2014
1 answer
274 views
Hi,

I have a RadButton inside my Tile. The button fires as expected, however there is a small margin between the tile and the button that I can't seem to get rid of. As a result, clicking the corner of the tile will select it, placing a check mark in the upper right corner. Is there a way to disable this functionality?



Thanks,
Melissa
Melissa
Top achievements
Rank 2
 answered on 14 Feb 2014
1 answer
259 views
I have a gridview on a second tabitem within a tabcontrol, and the column header cannot be binded.

It gives error
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='RadGridTest1.MainWindow', AncestorLevel='1''. BindingExpression:Path=DataContext.Header2; DataItem=null; target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')

--
MainWindowViewModel.cs

public class MainWindowViewModel
{
public string Header2
{
get { return "Header 2"; }
}
}

--
MainWindow.xaml

<Window x:Class="RadGridTest1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local="clr-namespace:RadGridTest1"
Title="MainWindow" Height="350" Width="525">
<Window.DataContext>
<local:MainWindowViewModel />
</Window.DataContext>

<Grid>
<TabControl>
<TabItem Header="Tab 1">
</TabItem>

<TabItem Header="Tab 2">
<telerik:RadGridView AutoGenerateColumns="False">

<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn>
<telerik:GridViewDataColumn.Header>
<TextBlock Text="{Binding Path=DataContext.Header2, RelativeSource={RelativeSource AncestorType={x:Type local:MainWindow}}}"/>
</telerik:GridViewDataColumn.Header>
</telerik:GridViewDataColumn>
</telerik:RadGridView.Columns>

</telerik:RadGridView>
</TabItem>
</TabControl>

</Grid>
</Window>

--
MainWindow.xaml.cs

public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
Yoan
Telerik team
 answered on 14 Feb 2014
3 answers
251 views
Hello,

I've just found an article explaining how to setup the RadRibbonWindow as main window
http://blogs.telerik.com/blogs/posts/10-05-03/using-radribbonwindow-with-radribbonbar-for-wpf.aspx, is it possible to do a similar thing with the RadWindow control?


Thanks.
Yana
Telerik team
 answered on 14 Feb 2014
1 answer
78 views
I'm using RadWindow.Confirm to let the user confirm some content that is wider than 400 units. 

Unfortunately RadWindow.Confirm shows the content with a horizontal scoll bar (see attachment). 

How do I change this so this, so that the RadWindow.Confirm dialog resizes to its content if it gets wider?

Yana
Telerik team
 answered on 14 Feb 2014
2 answers
217 views
I am attempting to place a RadChart with the legend collapsed within the small content RadFluidContentControl of a tileview, but setting the ChartLegend visibility to "Collapsed" does not appear to work.  However, if I utilize the same XAML code within a usercontrol and display the usercontrol in the small content RadFluidContentControl it does collapse the legend.  Any idea how to resolve this using in-line XAML within the RadFluidContentControl rather than utilize a usercontrol for the display of the chart?

My sample code for the specification of the tileview's content:

<DataTemplate x:Key="ContentTemplate">
    <telerik:RadFluidContentControl ContentChangeMode="Automatic" State="Normal" NormalToSmallThreshold="250 250" NormalToLargeThreshold="500 500">
     <telerik:RadFluidContentControl.SmallContent>
      <Grid DataContext="{Binding Source={StaticResource SampleDataSource}}">
       <telerik:RadChart x:Name="chtTrendingChart_Small" telerik:StyleManager.Theme="Windows8" ItemsSource="{Binding Collection}">
        <telerik:RadChart.DefaultView>
         <telerik:ChartDefaultView>
          <telerik:ChartDefaultView.ChartLegend>
              <telerik:ChartLegend Visibility="Collapsed" />
            </telerik:ChartDefaultView.ChartLegend>
          </telerik:ChartDefaultView>
        </telerik:RadChart.DefaultView>
       </telerik:RadChart>
      </Grid>
     </telerik:RadFluidContentControl.SmallContent>
     <telerik:RadFluidContentControl.Content>
      <local:UC_SmallGraph/>
     </telerik:RadFluidContentControl.Content>
     <telerik:RadFluidContentControl.LargeContent>
      <local:UC_LargeContent/>
     </telerik:RadFluidContentControl.LargeContent>
    </telerik:RadFluidContentControl>
   </DataTemplate>
   
Martin Ivanov
Telerik team
 answered on 14 Feb 2014
2 answers
176 views
Hi there,

I would like to share my style resource across multiple chart controls, But I am unable to do this as "SliceStyles" hasn't got setter.

In short I want to assign following resource to SliceStyles.
  <x:Array Type="Style" x:Key="styleList">
        <Style TargetType="Path">
            <Setter Property="Fill" Value="#FF5661"/>
        </Style>
        <Style TargetType="Path">
            <Setter Property="Fill" Value="#FF56DA"/>
        </Style>
         .......


.......
        <Style TargetType="Path">             <Setter Property="Fill" Value="#89638E"/>         </Style>     </x:Array>

So far I tried below code, which will not work, Is there any workaround OR How should we address this in best way.
 <telerik:PieSeries ItemsSource="{Binding Items}" SliceStyles="{Binding Path=., Source={StaticResource styleList}}"
 .....

Note: We do not want to do following.
  <telerik:PieSeries.SliceStyles>
         <Style TargetType="Path">
              <Setter Property="Fill" Value="#FF5661"/>
         </Style>
.......
        <Style TargetType="Path">             <Setter Property="Fill" Value="#89638E"/>         </Style>
  </telerik:PieSeries.SliceStyles>

Dipak
Top achievements
Rank 1
 answered on 14 Feb 2014
2 answers
133 views
Hi,

I'm creating a ScatterPointSeries at runtime and have had no problem adding it to my ChartView. I want to do this multiple times though so I want to apply a different brush to each.

ScatterPointSeries sps = new ScatterPointSeries();
brush = Brushes.Red; // This will be dynamic
sps.ItemsSource = source;
sps.XValueBinding = new PropertyNameDataPointBinding() { PropertyName = XPath };
sps.YValueBinding = new GenericDataPointBinding<T, float>() { ValueSelector = Function };

Chart.Series.Add(sps);


How can I apply the brush to the ScatterPointSeries points? I've experimented with a datatemplate, but this will only let me style all the scatterpoints to use the same brush.

Thanks,

Rob
Martin Ivanov
Telerik team
 answered on 14 Feb 2014
3 answers
693 views
I have a view where I drag from a GridView to a ScheduleView. In the constructor of the View (xaml code behind) I initialize the following events.

DragDropManager.AddDragInitializeHandler(Grid, OnDragInitialize);
DragDropManager.AddGiveFeedbackHandler(Grid, OnGiveFeedback);
DragDropManager.AddDragDropCompletedHandler(Grid, OnDragDropComplete);
DragDropManager.AddDragOverHandler(ScheduleView, OnDragOver);
DragDropManager.AddDragEnterHandler(ScheduleView, OnDragEnter);

All events are fired except for the OnDragOver...
If I subscribe the Dragover to the source Grid I get the event but only when dragging over the Grid (as expected I assume) not when entering the ScheduleView.
How can I enable the DragOver events?
Kalin
Telerik team
 answered on 14 Feb 2014
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
DataPager
PersistenceFramework
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?