Telerik Forums
UI for WPF Forum
1 answer
196 views
We wish to use application wide implicit styling of our application.

This documentation (http://www.telerik.com/help/wpf/styling-apperance-implicit-styles-overview.html) states that all we have to do is merge in the resources for the selected theme at the application level. We are doing this in code behind since the theme to be used is dependent on settings obtained from the user.

Adding this to the application's constructor implictly themes all the standard controls in the manner described in the current theming documentation.

         Resources.MergedDictionaries.Add(new ResourceDictionary()
         {
            Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/System.Windows.xaml",
               UriKind.RelativeOrAbsolute)
         });

         Resources.MergedDictionaries.Add(new ResourceDictionary()
         {
            Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Controls.xaml",
               UriKind.RelativeOrAbsolute)
         });

However adding this:

         Resources.MergedDictionaries.Add(new ResourceDictionary()
         {
            Source = new Uri("/Telerik.Windows.Themes." + themeName
               + ";component/Themes/Telerik.Windows.Controls.Navigation.xaml",
               UriKind.RelativeOrAbsolute)
         });


         Resources.MergedDictionaries.Add(new ResourceDictionary()
         {
            Source = new Uri("/Telerik.Windows.Themes." + themeName
               + ";component/Themes/Telerik.Windows.Controls.Docking.xaml",
               UriKind.RelativeOrAbsolute)
         });

Does not result in any of the docking components being themed.

Attempting this:

         Resources.MergedDictionaries.Add(new ResourceDictionary()
         {
            Source = new Uri("/Telerik.Windows.Themes." + themeName
               + ";component/Themes/Telerik.Windows.Documents.xaml",
               UriKind.RelativeOrAbsolute)
         });

Results in the exception "Could not load file or assembly Telerik.Windows.Documents" even though the documentation explicitly states that use of this resource is dependent on Telerik.Controls and Telerik.Controls.Input only, (both of which we reference).

This page (http://www.telerik.com/help/wpf/common-styling-apperance-setting-theme-wpf.html) states that setting an application wide built-in theme will not theme built-in controls, only the RadControls, while this page (http://www.telerik.com/help/wpf/common-styling-themes-mscontrols.html) describes how most of the common built in controls are actually themed as well.

My impression so far is that the documentation is out-of-date, incomplete and occasionally self-contradictory.

Using version 2012.3 with C#.

Yana
Telerik team
 answered on 02 Jan 2013
1 answer
376 views
I'm attempting to wire up some functionality that will hide all of the user interface tools such as navigation, labels, zoom, and lat/lng with a button click.  Essentially, I'd call the method below to hide everything, then perform some functionality in my button click event, and then call this method again to show the user interface tools.

What happens is that the RadMap hasn't actually completed the update to the control prior to the code in "Do some stuff" executing.  I've noticed a small delay in the map rendering when the labels are turned on and off.  It "appears" that I need to figure out how to wait for the RadMap to complete its rerendering after SetMapLabels(false) prior to executing the "Do some stuff" code.

Am I correct in my assumption?  If so, can you share some insight as to which event handler would get triggered in this scenario?

private void btnDoStuff_Click(object sender, RoutedEventArgs e)
{
  SetMapLabels(false);
  // Do some stuff
  SetMapLabels(true);
}


private void SetMapLabels(bool on)
       {
           if (on)
           {
               _provider.IsLabelVisible = true;
               //   this.RadMap1.UseDefaultLayout = true;
               this.RadMap1.CommandBarVisibility = System.Windows.Visibility.Visible;
               this.RadMap1.NavigationVisibility = System.Windows.Visibility.Visible;
               this.RadMap1.ScaleVisibility = System.Windows.Visibility.Visible;
               this.RadMap1.ZoomBarPresetsVisibility = System.Windows.Visibility.Visible;
               this.RadMap1.ZoomBarVisibility = System.Windows.Visibility.Visible;
               this.RadMap1.MouseLocationIndicatorVisibility = System.Windows.Visibility.Visible;
               this.RadMap1.MiniMapExpanderVisibility = System.Windows.Visibility.Hidden;
               this.RadMap1.InvalidateVisual();
               this.RadMap1.UpdateLayout();
               return;
           }
 
 
           _provider.IsLabelVisible = false;
           //   this.RadMap1.UseDefaultLayout = false;
           this.RadMap1.CommandBarVisibility = System.Windows.Visibility.Hidden;
           this.RadMap1.NavigationVisibility = System.Windows.Visibility.Hidden;
           this.RadMap1.ZoomBarPresetsVisibility = System.Windows.Visibility.Hidden;
           this.RadMap1.ZoomBarVisibility = System.Windows.Visibility.Hidden;
           this.RadMap1.ScaleVisibility = System.Windows.Visibility.Hidden;
           this.RadMap1.MouseLocationIndicatorVisibility = System.Windows.Visibility.Hidden;
           this.RadMap1.MiniMapExpanderVisibility = System.Windows.Visibility.Hidden;
           this.RadMap1.InvalidateVisual();
           this.RadMap1.UpdateLayout();
 
       }
Tsvetie
Telerik team
 answered on 02 Jan 2013
3 answers
230 views
Hello,

I would like to drag and drop multiple appointment located in several different resources. The default behavior of scheduleView is that all appointments are dropped into the pointed resource row on mouse release. What I want is a slide up or down of each item selected, keeping them at the same distance from each other's at the mouse release. You will see what I really want on attached pictures.

AB.

Yana
Telerik team
 answered on 02 Jan 2013
3 answers
420 views


Hi
I need to change the background color of a cell based on its value while using AutoGenerateColumns="True
Without using code behind (attach property is acceptable solution) 
The data context is  System.Data.DataTable

 Thanks in advance.

Dimitrina
Telerik team
 answered on 02 Jan 2013
2 answers
333 views

Is there any reason when executing either of the following two commands I should get the following error?

Command Executing:
//Loop Through Document Sections
foreach (Section sectionLayoutBox in radRichTextBox.Document.Children)
{
    //Loop Through Section Paragraphs
    foreach (Paragraph paragraph in sectionLayoutBox.EnumerateChildrenOfType<Paragraph>().ToList<Paragraph>())
    {
        //Remove Paragraph From Document
        //paragraph.Parent.Children.Remove(paragraph);
        sectionLayoutBox.Children.Remove(paragraph);
    }
}


Error Message: inline does not belong to this document.

I know my initial post is a little vague, I can elaborate in more detail if you require.

Thanks,

Rob
Petya
Telerik team
 answered on 02 Jan 2013
2 answers
171 views
Hi, after dragging the RadCombobox from the toolbox, the following exception are generated when the applicaiton runs.


Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.

{"Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception."}

{"Type reference cannot find type named '{clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls}MetroTouchTheme'."}


Have tried to re-add the reference but still no luck. we are using RadControls for WPF Q3 2012 binaries.

If I use a normal combobox, it works.

Anything else I can do?
Georgi
Telerik team
 answered on 02 Jan 2013
3 answers
147 views
Is this possible?
If not, will it be possible on first release?
Any suggestion or example on dynamic drill-down?

Best reguards
Mauro
Pana
Telerik team
 answered on 02 Jan 2013
1 answer
193 views
When I hit the Add button in the DataForm, all other buttons are disabled except the Save and Cancel.  At this point there are fields that are not valid (required for instance), but the user can still hit Save.  Validation kicks in, but I would prefer that the Save button would remain disabled until all fields are valid.

When the Edit button is hit, only the Edit button is disabled.  If the user edits the form, the record is now dirty, but the user is able to hit any of the other buttons (Add, Delete, or the Navigation buttons).  Now granted if you navigate to another record and then come back your changes are still there, but the Save and Cancel buttons are disabled until you hit edit again.  At this point Cancel does not remove any changes.  I am not using AutoCommit.

I would prefer that Edit would disable all the other commands, and Save would only become enabled when the user actually makes a change, and as with the Add button, Save would remain disabled until all fields are valid.

I assume you have valid reasons for the current implementation; however I would like to be able to override this behavior with the aboved described behavior.  Can you provide any guidance?

What I'd really like is to have control over the CanExecute method of the commands.  Is there any way to acheive this?

Thanks in advance,
Steve
Maya
Telerik team
 answered on 02 Jan 2013
1 answer
250 views
Hi,

I just want to use Telerik's "RadWindow".

<Window x:Class="_3DGraph.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"
        Title="MainWindow" Height="600" Width="800">
    <Grid>
        <telerik:RadWindow x:Name="radWindow1" Width="300" Height="300"></telerik:RadWindow>
    </Grid>
</Window>

using Telerik.Windows.Controls;
using Telerik.Windows.Controls.Navigation;

When I just click any of three buttons(minimize, maximize, close), I got this error... (I'm sending a screenshot)
What may be the problem?

And to move any RadWindow, do I have to write any code or it perceives movement behaviours automatically?

George
Telerik team
 answered on 02 Jan 2013
8 answers
276 views
Hello,

I styled the FilteringControl on a RadGrid to include a converter on the list of distinct values to filter by.

I am using this code in the converter,

            var filter = value as FilteringViewModel;
            if (filter != null)
            {
                foreach (DistinctValueViewModel distinctValue in filter.DistinctValues)
                {
                    
                }
                return filter.DistinctValues;
            }

            return null;

But when I put a breakpoint on the code it says that DistinctValues.Count = 0 and the loop will not trigger.

However, after the converter returns it's value, it shows the distinct values correctly.

I am wondering why I cannot access the distinct list inside the converter because I know it returns the right value.

Thank you,
Rossen Hristov
Telerik team
 answered on 02 Jan 2013
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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?