Telerik Forums
UI for WPF Forum
1 answer
58 views
Hi!

I have some problem with applying a style on a custom control derived from RadTreeListView.
This is the base style that works correctly on original RadTreeListView:
<Style TargetType="{x:Type telerik:RadTreeListView}" x:Key="IprRadTreeListViewStyle" BasedOn="{StaticResource IPRBaseStyle}">
        <Setter Property="ValidatesOnDataErrors" Value="None"/>
        <Setter Property="telerik:StyleManager.Theme" Value="Summer"/>
</Style>

I create another style based on the previous style:
<Style TargetType="{x:Type controls:IPRRadTreeListView}" BasedOn="{StaticResource IprRadTreeListViewStyle}">
</Style>

The CS code of my custom control:
class IPRRadTreeListView : RadTreeListView
    {
        static IPRRadTreeListView()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(IPRRadTreeListView), new FrameworkPropertyMetadata(typeof(RadTreeListView)));
        }
         
        public IPRRadTreeListView() : base()
        {   
           ...
        }
 
        ...
    }

If I run the application then my IPRRadTreeListView control doesn't become visible. I tried to apply the style explicitly ( Style = {StaticResource IprRadTreeListViewStyle} ) on my control but I had the same result: IPRRadTreeListView wasn't visible.

This scenario works correctly for IPRRadGridView (derived from RadGridView).

Could anbody help me, please?
Ivan Ivanov
Telerik team
 answered on 21 Jul 2011
1 answer
186 views
Hi, Telerik!

I got binding RadMenuItem dynamic data. When I set command parameters in ItemsContainerStyle it doesn't seem to be working. Can you please show how to implement this functionality?
Konstantina
Telerik team
 answered on 21 Jul 2011
3 answers
110 views
Hallo,
we have a serious problem with RadDocking in Telerik WPF Q2 2011.
We're using Prism (v. 4) as a composite framework. When I try dock an document window inside the Prism's module and I drag it from the original position & drop it e.g. into left dock panel, the exception is raised (see the call stack). Please help...
Thank you.
 Tomas.

-- Call stack  --
   MS.Internal.Controls.InnerItemCollectionView.AssertPristineModelChild(Object item)
       PFCP.Infrastructure.Client.Shell.EXE: N 15946004
   MS.Internal.Controls.InnerItemCollectionView.Insert(Int32 index, Object item)
       PFCP.Infrastructure.Client.Shell.EXE: N 00040
   System.Windows.Controls.ItemCollection.Insert(Int32 insertIndex, Object insertItem)
       PFCP.Infrastructure.Client.Shell.EXE: N 00150
   Telerik.Windows.Controls.RadDocking.OnDropContainer(RadSplitContainer container, Point globalMousePosition)
       RadDocking.cs: line 0347, column 06, IL 0175
   Telerik.Windows.Controls.RadDocking.DropWindow(ToolWindow toolWindow, Point globalMousePosition)
       RadDocking.cs: line 0269, column 04, IL 0007
   Telerik.Windows.Controls.Docking.ToolWindow.OnDragEnd(Point globalMousePosition, Boolean isCancel, Boolean isResize)
       ToolWindow.cs: line 0420, column 03, IL 0042
   Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IDragAware.OnDragEnd(Point globalMousePosition, Boolean isCancel, Boolean isResize)
       WindowBase.cs: line 0998, column 03, IL 0009
   Telerik.Windows.Controls.InternalWindow.WindowHostBase.OnDragEnd(Point globalMousePosition, Boolean isCancel, Boolean isResize)
       WindowHostBase.cs: line 0079, column 03, IL 0022
   Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.OnWindowPositionUpdateEnded(Point mousePosition)
       ChromelessWindowHelper.cs: line 0313, column 05, IL 0035
   Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.HandleSizeMoveEnd(IntPtr hwnd, IntPtr wParam, IntPtr lParam, Boolean& handled)
       ChromelessWindowHelper.cs: line 0483, column 04, IL 0011
   Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       ChromelessWindowHelper.cs: line 0563, column 05, IL 0026
   System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       PFCP.Infrastructure.Client.Shell.EXE: N 00205
   MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       PFCP.Infrastructure.Client.Shell.EXE: N 00352
   MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       PFCP.Infrastructure.Client.Shell.EXE: N 00151
   System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       PFCP.Infrastructure.Client.Shell.EXE: N 00090
   MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       PFCP.Infrastructure.Client.Shell.EXE: N 00071
----------------------------------------------------------------------------------------------------
 
End log, timestamp: 2011-07-18T10:03:26.8990299+02:00
===========================================================
Ivo
Telerik team
 answered on 21 Jul 2011
1 answer
321 views
Hi

i'm tring to change the spacing between lines in wpf RadRichText control. i've already tried the

ChangeParagraphSpacingAfter methode but it works only for empty data but when i load exsisting data
it return again with spaces.
my code look like:

private void rtfMain_Loaded(object sender, RoutedEventArgs e)
       {
           this.rtfControlMain.ChangeParagraphSpacingAfter(0);
           this.rtfControlMain.ChangeParagraphLineSpacing(1.15);
        }

xaml:

<telerik:RadRichTextBox x:Name="rtfControlMain"
                                ToolTip="{Binding ElementName=rtfControl,Path=Text}"
                                IsReadOnly="{Binding ElementName=rtfControl,Path=IsReadOnly}"
                                IsSelectionMiniToolBarEnabled="{Binding ElementName=rtfControl,Path=IsReadOnly, Converter={StaticResource inverseBooleanConverter}}"
                                FontFamily="Segoe UI" FontSize="11" DocumentInheritsDefaultStyleSettings="True" Grid.Row="2"  Loaded="rtfMain_Loaded">
            <telerik:RadRichTextBox.Resources>
                <Style TargetType="TextBlock" />
            </telerik:RadRichTextBox.Resources>
           
            <telerik:RadRichTextBox.Document>
                <telerik:RadDocument LineSpacing="1.15" ParagraphDefaultSpacingAfter="0"   />
            </telerik:RadRichTextBox.Document>
        </telerik:RadRichTextBox>

Please suggest how can i control this spacing.
Thanks,



Ivailo Karamanolev
Telerik team
 answered on 21 Jul 2011
1 answer
125 views
Hallo,
we have a serious problem with BussyIndicator component with the combination of theme "Metro". We're using bussy indicator inside splash window, which is opened during the app start up in the separate thread. Folowing exception is raised:

----------- Exception
   v System.Windows.DependencyObject.GetValue(DependencyProperty dp)
   v Telerik.Windows.Controls.MetroColorPalette.get_BasicColor() v c:\TB\102\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\Theming\MetroColorPalette.cs:line 39
   v Telerik.Windows.Controls.MetroColors.get_BasicColor() v c:\TB\102\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\Theming\MetroColors.cs:line 62
-----------

The xaml code of splash window is:
<Window x:Class="PFCP.Infrastructure.Client.Shell.MVVM.Splash"
        WindowStartupLocation="CenterOwner" 
        WindowStyle="None" 
        Height="240" Width="420"
        BorderBrush="Transparent" 
        BorderThickness="0" 
        ShowInTaskbar="False" 
        AllowsTransparency="True"
        Background="Transparent"
        ResizeMode="NoResize" 
        Icon="{x:Null}"
        >
  
    <Window.Resources>
    </Window.Resources>
  
    <telerik:RadBusyIndicator x:Name="_busyIndicator" IsBusy="True" BusyContent="{Binding BusyContent}">
  
        <Border HorizontalAlignment="Right" Margin="0" VerticalAlignment="Bottom" 
                Background="Goldenrod" BorderThickness="1" SnapsToDevicePixels="True" BorderBrush="Gray"
                CornerRadius="8">
            <Grid>
                <StackPanel>
                <Label Margin="4" Content="{Binding SplashTitle}" FontSize="24" HorizontalContentAlignment="Left" VerticalContentAlignment="Top"
                       Foreground="Black">
                    <Label.BitmapEffect>
                        <OuterGlowBitmapEffect GlowSize="15" />
                    </Label.BitmapEffect
                </Label>
                    <Label Margin="15,0,0,0" Content="{Binding VersionInfo}" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" Foreground="Black" />
                </StackPanel>
  
                <Image x:Name="image" Source="..\..\Images\SplashBackground.png"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  
                   SnapsToDevicePixels="True" RenderTransformOrigin="0.5,0.5">
                    <Image.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Image.RenderTransform>
                </Image>
            </Grid>
        </Border>
  
    </telerik:RadBusyIndicator>
</Window>

the code for display of the splash is:

/// <summary>
/// Helper class to show or close given splash screen
/// </summary>
internal class SplashScreenService : ISplashScreenService
{
    private Splash                  _splash = null;
    private SplashViewModel         _splashViewModel = null;
    /// <summary>
    /// Constructor
    /// </summary>
    public SplashScreenService(IContainer dependencyContainer)
    {
    }
    /// <summary>
    /// Set dynamic text in the splash
    /// </summary>
    /// <param name="message"></param>
    public void SetSplashText(string message)
    {
        if (this._splashViewModel != null)
        {
            this._splashViewModel.BusyContent = message;
        }
    }
    /// <summary>
    /// Show the splash screen
    /// </summary>
    public void ShowSplash(Window ownerWindow, string splashTitle, string versionInfo, string splashText)
    {
        if (this._splash != null)
        {
            this._splash.Dispatcher.BeginInvoke(new Action(() =>
            {
                this._splash.Close();
            }));
        }
        System.Threading.Thread thread = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart((object oParam) =>
        {
            SplashStartInfo splashStartInfo = oParam as SplashStartInfo;
            Debug.Assert(splashStartInfo != null);
            this._splashViewModel = new SplashViewModel();
            Splash splashView = new Splash(_splashViewModel);
            this._splashViewModel.SplashTitle = splashStartInfo.SplashTitle;
            this._splashViewModel.VersionInfo = splashStartInfo.VersionInfo;
            this._splashViewModel.BusyContent = splashStartInfo.SplashText;
            if (splashStartInfo.OwnerHandle != null)
            {
                WindowInteropHelper winInteropHelper = new WindowInteropHelper(splashView);
                winInteropHelper.Owner = splashStartInfo.OwnerHandle;
            }
            this._splash = splashView;
            this._splash.ShowDialog();
        }));
        thread.SetApartmentState(System.Threading.ApartmentState.STA);
        thread.Start(new SplashStartInfo(ownerWindow, splashTitle, versionInfo, splashText));
    }
    /// <summary>
    /// Close the splash screen
    /// </summary>
    public void CloseSplash()
    {
        if (this._splash != null)
        {
            this._splash.Dispatcher.BeginInvoke(new Action(() =>
            {
                this._splash.Close();
            }));
            if (this._splash is IDisposable)
            {
                (this._splash as IDisposable).Dispose();
            }
        }
    }
}
#region helper class SPlashStartInfo...
/// <summary>
/// Helper class for start of the splash screen in the separate thread
/// </summary>
class SplashStartInfo
{
    public SplashStartInfo(Window ownerWindow, string splashTitle, string versionInfo, string splashText)
    {
        this.SplashTitle = splashTitle;
        this.VersionInfo = versionInfo;
        this.SplashText = splashText;
        this.OwnerHandle = new WindowInteropHelper(ownerWindow).Handle;
    }
    public string SplashTitle { get; set; }
    public string SplashText { get; set; }
    public string VersionInfo { get; set; }
    public IntPtr OwnerHandle { get; set; }
}

 If I set in the App.OnStartup() method "StyleManager.ApplicationTheme = new MetroTheme();" the exception is raised, when I use any other theme, application starts without any problems.. Thanks for any solution.
Tomas.
Dani
Telerik team
 answered on 21 Jul 2011
1 answer
129 views
If you move the quick access bar below the ribbon the text "Show below the ribbon." becomes blank.
It also happens in each of your WPF demo ribbonview applications.
At least it does on my machine (windows 7 32bit).

Attached is an image of it happening in your demo.

Please let me know if there is a patch or a way I can override it in code-behind c#.
Viktor Tsvetkov
Telerik team
 answered on 21 Jul 2011
6 answers
235 views
Hello, I've tried to generate the style for the control as said onhttp://www.telerik.com/help/wpf/raddatafilter-styles-and-templates-styling-the-raddatafilter.html

But, I can't seem to do the "Create a Copy" for creating the style/template structure for the control.

Where can I find it to be able to put on my ResourceDictionary and edit the Style default?

Thanks
Rossen Hristov
Telerik team
 answered on 21 Jul 2011
2 answers
90 views
RadControl for WPF 4.0 2011.2.0712
Blend 4.0
For all AdditionalTemplates only CreateEmpty action.
Also Demo project Themes_WPF not compiling

by error The 'clr-namespace' URI refers to a namespace 'Telerik.Windows.Controls.External' that is not included in the assembly.   

All projects in Themes_WPF solution targeted to 3.5 framework and have not valid reference to System.Xaml not presented in 3.5 framework.

Tatarincev
Top achievements
Rank 1
 answered on 21 Jul 2011
0 answers
75 views
Hi Support
I have problem with binding a value of FilterDescriptor in RadGridView. I'm just able of binding it to StaticResource how can we bind it to non static ones.

Thanks in advance
Mehri
Mehri
Top achievements
Rank 1
 asked on 21 Jul 2011
3 answers
243 views
I have a gridview, with a column that is a date. It displays the date in the format of the current culture.
However, at runtime the culture can change.
How can I let the gridview adapt to this new culture, so that the dates are formatted in the new culture format?
Milan
Telerik team
 answered on 21 Jul 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
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?