Telerik Forums
UI for WPF Forum
1 answer
129 views
I have an assembly that can either run as a stand-alone executable or being hosted in a browser as xbap. The application opens a new RadRibbonWindow which contains a RadRibbonView.

This works fine when the assembly runs stand-alone. However, when the assembly runs as xbap, the RadRibbonWindow overlaps all window buttons (close/minimize/maximize). Is there a solution to this other than  hosting the RadRibbonView in a standard WPF-window instead of RadRibbonWindow?

Regards,
Michael
Petar Mladenov
Telerik team
 answered on 27 Jun 2012
1 answer
88 views

Hello,

I would like to create appointments without the little x in the upper right hand corner of the appointment.

How can this be done?

Thanks in advance.

Dani
Telerik team
 answered on 27 Jun 2012
1 answer
190 views
I have an app with quite a few different GridViews all of which need to have their settings persisted. Currently, I am creating a file for each GridView to persist the settings between sessions. Is there a way to consolidate this so that more than one gridview can share a settings file? Here is the current code I have for doing persistence:

/// <summary>
    /// Interaction logic for BillingActivityView.xaml
    /// </summary>
    public partial class BillingActivityView
    {
        private static readonly string _appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
 
        private static readonly string _bambooSettingsPath = Path.Combine(_appDataPath, @"Bamboo\Settings");
 
        private static readonly string _testsGridSettingsFilePath = Path.Combine(_bambooSettingsPath, @"TestsGridSettings.bin");
 
        private static readonly string _oldBillClassesGridSettingsFilePath = Path.Combine(_bambooSettingsPath, @"OldBillClassesGridSettings.bin");
 
        private static readonly string _insuranceStatusGridSettingsFilePath = Path.Combine(_bambooSettingsPath, @"InsuranceStatusGridSettings.bin");
 
        /// <summary>
        /// Initializes a new instance of the <see cref="DocumentImageView"/> class.
        /// </summary>
        public BillingActivityView()
        {
            InitializeComponent();
            ServiceProvider.RegisterPersistenceProvider<ICustomPropertyProvider>(typeof(RadGridView), new GridViewCustomPropertyProvider());
        }
 
        private void TestsGridView_Initialized(object sender, EventArgs e)
        {
            LoadGridSettings(TestsGridView, _testsGridSettingsFilePath);
        }
 
        private void OldBillClassesGridView_Initialized(object sender, EventArgs e)
        {
            LoadGridSettings(OldBillClassesGridView, _oldBillClassesGridSettingsFilePath);
        }
 
        private void InsuranceStatusGridView_Initialized(object sender, EventArgs e)
        {
            LoadGridSettings(InsuranceStatusGridView, _insuranceStatusGridSettingsFilePath);
        }
 
        public void LoadGridSettings(RadGridView gridView, string settingsPath)
        {
            var manager = new PersistenceManager();
 
            if (!Directory.Exists(_bambooSettingsPath))
            {
                Directory.CreateDirectory(_bambooSettingsPath);
            }
 
            // Load settings if there is something to load
            if (File.Exists(settingsPath))
            {
                try
                {
                    var fileStream = File.OpenRead(settingsPath);
                    manager.Load(gridView, fileStream);
                    fileStream.Close();
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.WriteLine(ex.Message, "BILLINGACTIVITYVIEW");
                }
            }
        }
 
        public void PersistAllGridSettings()
        {
            PersistGridSettings(TestsGridView, _testsGridSettingsFilePath);
            PersistGridSettings(OldBillClassesGridView, _oldBillClassesGridSettingsFilePath);
            PersistGridSettings(InsuranceStatusGridView, _insuranceStatusGridSettingsFilePath);
        }
 
        public void PersistGridSettings(RadGridView gridView, string settingsPath)
        {
            var manager = new PersistenceManager();
            var stream = manager.Save(gridView);
 
            using (var fileStream = File.Create(settingsPath))
            {
                stream.CopyTo(fileStream);
            }
        }
    }
Lancelot
Top achievements
Rank 1
 answered on 26 Jun 2012
1 answer
117 views
Hello, I have a RadTileView where I want to change the header background color when the tile gets minimized.
When I apply the new style the header text disappears, this doesn't happen when the new style is the same as the old one

(I know this example only works when all items are minimized, not when you maximize another item, but this is just for test purposes)

C#:
private void RadTileViewItem_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
    RadTileViewItem item = (sender as RadTileViewItem);
    if (item.TileState == TileViewItemState.Maximized)
    {
        item.TileState = TileViewItemState.Minimized;
        item.HeaderStyle = (Style)FindResource("TileViewItemHeaderStyle4");
    }
    else
    {
        item.TileState = TileViewItemState.Maximized;
    }           
}

XAML:
<UserControl xmlns:my="clr-namespace:WpfApplication1"  x:Class="WpfApplication1.NodeView"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:TileView="clr-namespace:Telerik.Windows.Controls.TileView;assembly=Telerik.Windows.Controls.Navigation"           >
    <UserControl.Resources>
        <Style x:Key="TileViewItemHeaderStyle1" TargetType="{x:Type TileView:TileViewItemHeader}">
            <Setter Property="Background" Value="red">
            </Setter>
        </Style>
        <Style x:Key="TileViewItemHeaderStyle2" TargetType="{x:Type TileView:TileViewItemHeader}">
            <Setter Property="Background" Value="Orange">
            </Setter>
        </Style>
        <Style x:Key="TileViewItemHeaderStyle3" TargetType="{x:Type TileView:TileViewItemHeader}">
            <Setter Property="Background" Value="Green">
            </Setter>
        </Style>
        <Style x:Key="TileViewItemHeaderStyle4" TargetType="{x:Type TileView:TileViewItemHeader}">
            <Setter Property="Background" Value="Blue">
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid>
 
        <telerik:RadTileView Name="radTileView1"  MinimizedColumnWidth="300" MinimizedRowHeight="155" VerticalAlignment="Top" IsVirtualizing="True"  Grid.ColumnSpan="3">
            <telerik:RadTileViewItem Header="Node Back Left"  HeaderStyle="{StaticResource TileViewItemHeaderStyle1}" MouseLeftButtonUp="RadTileViewItem_MouseLeftButtonUp"/>
            <telerik:RadTileViewItem Header="Node Back Right" HeaderStyle="{StaticResource TileViewItemHeaderStyle2}" MouseLeftButtonUp="RadTileViewItem_MouseLeftButtonUp"/>
            <telerik:RadTileViewItem Header="Node Front Left" HeaderStyle="{StaticResource TileViewItemHeaderStyle3}" MouseLeftButtonUp="RadTileViewItem_MouseLeftButtonUp"/>
            <telerik:RadTileViewItem Header="Node Front Right" HeaderStyle="{StaticResource TileViewItemHeaderStyle4}" MouseLeftButtonUp="RadTileViewItem_MouseLeftButtonUp"/>
            <telerik:RadTileViewItem Header="Node Center" HeaderStyle="{StaticResource TileViewItemHeaderStyle3}" MouseLeftButtonUp="RadTileViewItem_MouseLeftButtonUp">
            </telerik:RadTileViewItem>
        </telerik:RadTileView>
    </Grid>
</UserControl>

A
Lancelot
Top achievements
Rank 1
 answered on 26 Jun 2012
2 answers
141 views
Hi,

I need to allow the user to add timeline live events by clicking with the mouse somewhere in the timeline. Can anyone tell me how to get the time corresponding to a mouse click event?

Regards,
Mathias
Johannes
Top achievements
Rank 1
 answered on 26 Jun 2012
1 answer
119 views
Hi,

is it possible to pre-select the destination-folder on saving a document in the richtextbox by code?

Background:
For Each Project in my Application i have to create a Folder (d:/Projects/Holiday_2012/Docs/). After opening a project in my
application the user could create a document in the richtextbox. If the user wants so save the document the Dialog should open
in the wright Destination Folder.

SOLVED !!!!!

Thanks
Regards
Rene
Iva Toteva
Telerik team
 answered on 26 Jun 2012
1 answer
146 views
Using 2012.2.607.40 I receive an exception, "Cannot locate resource 'themes/genericmetrotouch.xaml'", in the VS 2010 Xaml designer when a RadNumericUpDown control is included in the form.  I've included a screenshot of the exception.  There is no exception when running the app, or if I display the form in Blend.
Thanks,
Steve
Dani
Telerik team
 answered on 26 Jun 2012
3 answers
133 views
Hi,

I have read an article where the when we use the rad pane to float. It uses FloatingOnly.  Is there a way to override this menu to use the method MakeFloatingDockable instead of MakeFloatingOnly

Also how would you re-dock a floating window from code.
Konstantina
Telerik team
 answered on 26 Jun 2012
3 answers
172 views
I need to make an hierarchical tree bound to an entity model. Shall I use a RadEntityFrameworkDataSource? Do you have any examples?
 
Eliyahu Goldin
Top achievements
Rank 1
 answered on 26 Jun 2012
1 answer
289 views
I'm trying to make a custom theme for the RadTimeline. 

Im my custom theme, I want to wrap a ScrollViewer around the Timeline's TimelineItemContainer just like described in this post: http://www.telerik.com/community/forums/silverlight/timeline/vertical-scrollbar-scrollviewer-and-radtimeline.aspx 
and I want to remove the horizontal scrollbar of the control (the RadSlider at the bottom).

I've tried to create a custom theme using the approach described here:
http://www.telerik.com/help/silverlight/common-styling-apperance-themes-custom-theme-project-telerik-approach.html 
(albeit the documentation is for Silverlight, couldn't find anything similar for WPF)
and I've also had a look at the sample project here:
http://www.telerik.com/community/forums/wpf/general-discussions/how-can-i-create-a-custom-theme-for-wpf-application.aspx 

I couldn't manage to get the theme working.
I'm not sure if I made everything right in the theme project - especially the following things in the XAML of my custom theme:
  •  <my:MyTheme x:Key="Theme" />
  • The many references to ThemeType=telerik:Office_BlackTheme
  • content of Generic.xaml
  • declaration of MyTheme class
Basically, I've just copied the file C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2012 SP1\Themes\WPF40\Windows7\Themes\Telerik.Windows.Controls.DataVisualization.xaml which contains the style for RadTimeline to my CustomTheme project and modified the style there. I'm not quite sure, if that was correct, or what I've done wrong.


Actually, it doesn't have to be a whole custom theme, I just want to change the style of RadTimeline like described above. So, my first try was to edit the style using Expression Blend. I selected the RadTimeline and chose: Edit Template --> Edit a Copy. This alone shouldn't change the style at all, shouldn't it? But instead, the whole control is white/transparent - please see the attached files before_edit_template.png and after_edit_template.png. I expect it to look exactly the same as before calling Edit Template --> Edit a Copy. Why isn't it?

Here (http://johannes.unterguggenberger.info/TimelineCustomTheme.zip) is a Solution which contains 2 Projects: A custom theme project and a project which uses the custom theme (at least tries to) to change the style of a RadTimeline. Maybe someone could have a look at it and maybe tell me, what's the problem, or point me in a direction.

Thanks in advance!
Tsvetie
Telerik team
 answered on 26 Jun 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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Bronze
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
Bronze
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?