Telerik Forums
UI for WPF Forum
2 answers
223 views
In my RadPane I have a Listbox that is part of a UserControl in the Content section that I need to bind to a ComboBox in the TitleTemplate section; is this possible? A co-worker suggested searching the visual tree but I'm hoping there's a better way. The code currently falls down on the ItemsSource binding in the UserControl. A XAML solution is preferred but code-behind is fine if that is what is required.

TitleTemplate:
<DataTemplate x:Key="TitleTemplate">
  <Grid>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto"/>
      <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <ContentPresenter Content="{Binding}"/>
    <StackPanel Orientation="Horizontal" Grid.Column="1">
      <ComboBox x:Name="Top" ItemsSource="{Binding Source={x:Static TopLevelElements}}"/>
      <ComboBox x:Name="Middle" ItemsSource="{Binding ElementName=Top, Path=SelectedItem.MiddleLevelElements}"/>
    </StackPanel>
  </Grid>
</DataTemplate>

UserControl:
<!--xmlns declarations in example omitted for brevity-->
<UserControl x:Class="BottomItemView">
  <Border>
    <ListBox x:Name="Bottom" ItemsSource="{Binding ElementName=Middle, Path=SelectedItem.BottomLevelElements}"/>
  </Border>
</UserControl>

Code for customized RadPane:
Public Class CustomRadPane
  Inherits RadPane
  
  Public Sub New(ByVal title As Object)
    MyBase.New()
    Me.Title = title
    Me.TitleTemplate = TryCast(FindResource("TitleTemplate"), DataTemplate)
    Me.Content = System.Activator.CreateInstance(BottomItemView)
  End Sub
End Class
Jason
Top achievements
Rank 1
 answered on 19 Dec 2011
1 answer
107 views
We are examining your ScheduleView control for a while. We are trying to adapt a special calendar named "Merch Calendar" to your ScheduleView. We think that ScheduleView is a good choice for us. In this adaption we need to customize your Rad ScheduleViewDefinitions section to fulfil our needs. If you look at the upper section of our attached screenshot you will see like  201151 201201 values. Their meanings are: 2011-2012 year information and 51-52 are week information. Additionally, size of the bars which corresponds to appointments should be resized by the users and we need to get these changing date values. In this context, how can we customize the ScheduleViewDefinition section.Will these modifications fulfil our needs or are there any other possible ways.
Thanks, best regards.
Rosi
Telerik team
 answered on 19 Dec 2011
3 answers
419 views
Hello,

I am trying to add a drop shadow to the Tab Control DropDownMenu. Currently, I am applying the drop shadow effect to the outermost border within "Telerik_Windows_Controls_TabControl:DropDownMenu" Control Template. The only way I have been able to make the effect visible is by increasing the margins around the containing grid. The problem with this is the margins now push the border/dropdownmenu away from the DropDownMenuButton, so it appears to be floating on its own. Applying a RenderTransform to compensate for the shift only cuts off the drop shadow effect. I have attached an image demonstrating this behavior.

<ControlTemplate TargetType="{x:Type Telerik_Windows_Controls_TabControl:DropDownMenu}">
    <Grid x:Name="PopupContentElement"
          Margin="40,0,40,80"
          RenderTransformOrigin="0,0">
        <Grid.RenderTransform>
            <TranslateTransform X="-40" />
        </Grid.RenderTransform>
        <Border BorderBrush="#FF848484"
                BorderThickness="{TemplateBinding BorderThickness}"
                Background="White">
            <Border.Effect>
                <DropShadowEffect BlurRadius="40"
                                  Color="Black"
                                  Direction="0"
                                  Opacity="0.85"
                                  RenderingBias="Quality"
                                  ShadowDepth="0" />
            </Border.Effect>

Any suggestions how to achieve the drop shadow effect without destroying the layout?

Thanks,
Frankie
Kiril Stanoev
Telerik team
 answered on 19 Dec 2011
1 answer
79 views
I have an object property that's an int32.  It's really a duration-in-seconds, but for a variety of reasons we can't use a TimeSpan, which also seems not to be supported as a masked-input or column type by Telerik.

I'd like to be able to allow users to input time in minutes:seconds in a column that's bound to this property.  When I tried it, I got conversion errors.

Is this supported directly?  I'll also trying adding conversion properties to my partial classes (I'm using Entity Framework 4) and see if that works, i.e. binding to the conversion properties.
Nick
Telerik team
 answered on 19 Dec 2011
2 answers
71 views
Hello,

I have been breaking my head over the following problem and I do not get it working fully.

I have a collection of Fase.
The Fase object Has three collectlions namely
Software
Training
Consultancy.

I want my treeview to look like this
Fase1
-Software
--Item1
--Item2
-Training
--Item1
--Item2
-Consultancy
--Item1
--Item2
Fase1
-Software
--Item1
--Item2
-Training
--Item1
--Item2
-Consultancy
--Item1
--Item2


These also all need different template but I am not able to figure out to get the first part working
Fase1
-Software
-Training
-Consultancy

Is it even possible what I try to create with my current dataobjects.

Kevin Hendriks
Top achievements
Rank 1
 answered on 19 Dec 2011
3 answers
64 views
Hi,

I'm using Telerik V2011.3.1116.35 and VS2008. I have a RadWindow with multiple Telerik components inside of it. When in the designer part I click on my RadRichTextBox I receive the following message in my designer:

Exception has been thrown by the target of an invocation.

at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

 

Ambiguous match found.

at System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) at System.Type.GetProperty(String name) at MS.Internal.ComponentModel.DependencyPropertyKind.get_IsDirect() at MS.Internal.ComponentModel.DependencyPropertyKind.get_IsAttached() at MS.Internal.ComponentModel.APCustomTypeDescriptor.GetProperties(Attribute[] attributes) at MS.Internal.ComponentModel.APCustomTypeDescriptor.GetProperties() at System.ComponentModel.TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetProperties() at System.ComponentModel.TypeDescriptor.GetPropertiesImpl(Object component, Attribute[] attributes, Boolean noCustomTypeDesc, Boolean noAttributes) at System.ComponentModel.TypeDescriptor.GetProperties(Object component) at MS.Internal.Model.ModelPropertyCollectionImpl.GetProperties(String propertyNameHint) at MS.Internal.Model.ModelPropertyCollectionImpl.<GetEnumerator>d__0.MoveNext() at MS.Internal.Designer.PropertyEditing.Model.ModelPropertyMerger.<GetFirstProperties>d__0.MoveNext() at MS.Internal.Designer.PropertyEditing.Views.PropertyEntryReader.RedraftEntries(IPropertyViewManager viewManager, Selection selection, Boolean attachedOnly, IEventCodeBehindProxy eventCodeBehindProxy, CategoryList categoryList) at MS.Internal.Designer.PropertyEditing.PropertyInspector.UpdateCategories(Selection selection, Boolean attachedOnly, IEntryReader entryReader) at MS.Internal.Designer.PropertyEditing.PropertyInspector.RefreshPropertyList(Boolean attachedOnly) at MS.Internal.Designer.PropertyEditing.PropertyInspector.OnSelectionChangedIdle()

Thank's

Thank's
Iva Toteva
Telerik team
 answered on 19 Dec 2011
3 answers
203 views
We have problems in scrolling datagrid with long description column. If the display value for a column is not too long, the scrolling is working properly. However if there is a long description shown in a column as shown in the attached screen, the screen will hang when scrolling in the datagrid and the WPF window cannot be recovered until closed and reopened. The no of records are not that large and are around 600 only. Below is the reference code. Please advice the solution.

style dictionary file

<

Style TargetType="{x:Type telerik:RadGridView}">

  <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>

  <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>

  <Setter Property="RowIndicatorVisibility" Value="Collapsed"/>

  <Setter Property="AutoGenerateColumns" Value="False"/>

  <Setter Property="AutoExpandGroups" Value="True" />

</Style>

 

<Style TargetType="{x:Type telerik:GridViewDataColumn}">  

  <Setter Property="TextWrapping" Value="Wrap" />

  <Setter Property="Width" Value="Auto" />

  <Setter Property="Header">

    <Setter.Value>

      <TextBlock TextWrapping="Wrap" />

    </Setter.Value>

  </Setter>

</Style>


xaml file

<

telerik:RadGridView Grid.Row="0"  ItemsSource="{Binding SearchResult, Mode=OneWay}" IsReadOnly="True" IsFilteringAllowed="True">

 <telerik:RadGridView.Columns>

     <telerik:GridViewDataColumn DataMemberBinding="{Binding Cost_Centre_Code}" Header="Cost Centre" Width="Auto"> </telerik:GridViewDataColumn>

...
  <
telerik:GridViewDataColumn DataMemberBinding="{Binding Description_Display}" Header="Description" Width="*"> </telerik:GridViewDataColumn>

  <telerik:GridViewDataColumn DataMemberBinding="{Binding DR}" Header="DR" TextAlignment="Right" HeaderTextAlignment="Right" Width="Auto"> </telerik:GridViewDataColumn>

    <telerik:GridViewDataColumn DataMemberBinding="{Binding CR}" Header="CR" TextAlignment="Right" HeaderTextAlignment="Right" Width="Auto"> </telerik:GridViewDataColumn>

</telerik:RadGridView.Columns>

</telerik:RadGridView>

 

Vlad
Telerik team
 answered on 19 Dec 2011
1 answer
84 views
I have a 3d bar chart displaying but the edges are not smooth.  Is there a way to enable anti-aliasing for it?
Vladimir Milev
Telerik team
 answered on 19 Dec 2011
2 answers
95 views
Is there a way to disable that behaviour?

Thanks,

Anders, Denmark
Anders
Top achievements
Rank 1
 answered on 19 Dec 2011
1 answer
92 views
Hi,

I just upgraded Telrik from V2011.3.1116.35 to V2011.3.1205.35 and I realised that Telerik.Windows.Controls.DataServices.dll and Telerik.Windows.Controls.EntityFramework.dll still at V2011.3.1116.35 :( Is this normal???

Thank's
Hristo
Telerik team
 answered on 19 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?