Telerik Forums
UI for WPF Forum
1 answer
177 views
Hi,

I have created a simple spread sheet control in my WPF app without any tool bars as follows:

<telerik:RadSpreadsheet x:Name="radSpreadsheet"/>

When I right click on a worksheet Tab in the sheet selector and bring up the worksheet context menu, the Delete and Insert items do not work. (I have multiple worksheets)

The Rename and Tab Colour items do work, as does the special Tab to add a worksheet.

Can you please let me know if I am doing something wrong?

Thanks
Anthony
Anna
Telerik team
 answered on 10 Jul 2014
6 answers
787 views
I want to show only  year on raddatepicker , and the user can enter a value is year.
But it will error if I just enter the value in 2014,but if I enter 01/01/2014, there is no error message.
In the hidden code:
 
  timePicker.Culture.DateTimeFormat = new System.Globalization.DateTimeFormatInfo ShortDatePattern = {"yyyy"};

XAML:
DateSelectionMode = "Year"


Sorry my english :)
Kalin
Telerik team
 answered on 10 Jul 2014
4 answers
310 views
Hi,

I need to create a custom theme (With White,Gray,Blue)  for my WPF Application which has Tabs, Grids, Text Boxes and Toolbars. I would like to have it look  similar to  3rd image of Figure 1 in the link ( I need Toolar, Tab Headers,Grid Headers and Selected Rows Blue in color, with text whitish. The grid rows should have White background with black text.)
http://www.telerik.com/help/wpf/common-styles-appearance-colorizing-metro-theme.html#seeAlsoToggle

Can some one let me know how this can achieved. 

I tried to apply Windows8Theme and change the colors in OnStartup() method as below:
StyleManager.ApplicationTheme = new Windows8Theme();
Windows8Palette.Palette.MainColor = Colors.White;
Windows8Palette.Palette.AccentColor = Colors.Blue;
Windows8Palette.Palette.BasicColor = Colors.Blue;
Windows8Palette.Palette.StrongColor = Colors.White;
Windows8Palette.Palette.MarkerColor = Colors.Blue;
Windows8Palette.Palette.ValidationColor = Colors.Blue;
But that does not loo good on RadGridView as the Grid headers and sort icons done show up.







Vanya Pavlova
Telerik team
 answered on 10 Jul 2014
1 answer
115 views
Hello!

I want to use variables in the middle of the imported rtf document.

When I write:
RtfBox.InsertField(new DocumentVariableField() { VariableName = "Name" }, FieldDisplayMode.Code);
field appears at the beginning of the document.

Is there any way to force field to appear at concrete place?



Petya
Telerik team
 answered on 09 Jul 2014
1 answer
134 views
Hi
I'm using RadGridView with all columns width set to "*". I set grid minwidth property and expect to see horizontall scrollbar on form resizing, but nothing appears. Documentation says not to use scrollviewer with radgridview.

please, suggest a proper way to solve the problem
wbr, 
slava
Yoan
Telerik team
 answered on 09 Jul 2014
1 answer
1.1K+ views

I'm having a problem where the IsSelected property of a row item is not getting set correctly if that row is not visible with EnableRowVirtualization="True". Only the rows that are visible get their IsSelected updated correctly. This is a problem when you want to perform an action on all selected items. See below for a simple example to illustrate. If you:

  • Run it with EnableRowVirtualization="False"
  • Select the first item
  • Scroll to the bottom
  • Select the last item

then the Selected Rows is 100, which is correct. Now if you repeat the test with EnableRowVirtualization="True",  you see you only have 12 rows selected. Now scroll up, and more and more rows will be selected as they come into view.

Is there a way to either force the IsSelected property to be updated on non-visible rows, or a way to retrieve the actual list of selected items?

Thanks,
Louis

XAML:

<Window x:Class="VirtualIsSelected.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <telerik:RadGridView Grid.Row="0"  x:Name="radGridView"
                             AutoGenerateColumns="True"
                             ItemsSource="{Binding Path=Segments}"
                             SelectionMode="Extended"
                             GroupRenderMode="Flat"
                             EnableRowVirtualization="True">
            <telerik:RadGridView.Resources>
                <Style TargetType="{x:Type telerik:GridViewRow}">
                    <Setter Property="IsSelected"
                            Value="{Binding Path=IsSelected,
                                            Mode=OneWayToSource}"/>
                </Style>
            </telerik:RadGridView.Resources>
        </telerik:RadGridView>
        <StackPanel Grid.Row="1" Orientation="Horizontal">
            <Label>Selected Rows:</Label>
            <TextBox Text="{Binding SelectedCount}" IsReadOnly="True"/>
        </StackPanel>
    </Grid>
</Window>

Code-Behind:
public class Segment
{
    private bool _IsSelected = false;
    private MainWindow _MyWindow;
    public Segment(MainWindow window)
    {
        _MyWindow = window;
    }
    public int Value { get; set; }
    public bool IsSelected
    {
        get { return _IsSelected; }
        set
        {
            _IsSelected = value;
            _MyWindow.RefreshCount();
        }
    }
}
public partial class MainWindow : Window, INotifyPropertyChanged
{
    public int SelectedCount { get; set; }
    public Collection<Segment> Segments { get; set; }
    public MainWindow()
    {
        Segments = new Collection<Segment>();
        for (int x = 0; x < 100; x++)
        {
            Segments.Add(new Segment(this) { Value = x });
        }
        SelectedCount = 0;
        InitializeComponent();
        DataContext = this;
    }
    public void RefreshCount()
    {
        SelectedCount = Segments.Where(s => s.IsSelected).Count();
        if (PropertyChanged != null)
            PropertyChanged(this, new PropertyChangedEventArgs("SelectedCount"));
    }
    public event PropertyChangedEventHandler PropertyChanged;
}
Yoan
Telerik team
 answered on 09 Jul 2014
1 answer
543 views
Hi,
I am using Telerik RadTreeView control, I have implemented context menu when i right click for selected treenode,if i right click empty space same context menu displaying.How to remove contextmenu for empty place.

Regards,
Ranjith
Martin Ivanov
Telerik team
 answered on 09 Jul 2014
6 answers
324 views
I'm trying to find a way to get my tiles to dynamically size to the width of the panel (with ColumnsCount set by users) down to a minimum, then enable scrolling. 

If ColumnWidth="*" it displays correctly with a small ColumnsCount:


But with a large ColumnsCount it shrinks the tiles down below the minimum size of the contained control:



If I set ColumnWidth="Auto" it displays correctly with a large ColumnsCount:


But with a small ColumnsCount it displays them at their minimum size with a bunch of extra white space to the right:


Is there a way to get it to resize down to a minimum then scroll?

Thanks,
Louis
Milena
Telerik team
 answered on 09 Jul 2014
8 answers
307 views
Dear Telerik support,
Please see this video: https://www.youtube.com/watch?v=Q4vtPcpiGcY

The code that I use to change the colors is:

                        StyleManager.ApplicationTheme = new Windows8TouchTheme();
                        var convertFromString = ColorConverter.ConvertFromString("#FFAF231E");
                        if (convertFromString != null)
                        {
                            var color = (Color)convertFromString;
                            Windows8TouchPalette.Palette.AccentColor = color;
                            //Windows8TouchPalette.Palette.EffectHighColor = Colors.Yellow;
                            //Windows8TouchPalette.Palette.EffectLowColor = Colors.Green;
                            Windows8TouchPalette.Palette.HighColor = Colors.White;
                            Windows8TouchPalette.Palette.InvertedColor = color;
                            Windows8TouchPalette.Palette.InvertedForegroundColor = Colors.White;
                            Windows8TouchPalette.Palette.LowColor = color;
                            //Windows8TouchPalette.Palette.MainColor = color;
                            //Windows8TouchPalette.Palette.MainForegroundColor = color;
                            Windows8TouchPalette.Palette.MediumColor = Colors.Red;
                            Windows8TouchPalette.Palette.ValidationColor = color;
                        }

Version of the controls: 2013.2.611.45

I have few questions:

1. Can you please tell me when i select a row how to change the Foreground on the text to white from the template? I not see it is possible but can miss something. In your documentation ( http://www.telerik.com/help/wpf/common-styles-appearance-colorizing-metro-theme.html ) not have a information where exactly all different properties apply the colors. What mean EffectLowColor? From the name means nothing as most of the all. The only way to know their meaning is to experiment to add different colors to see where what will be changed. The example in the documentation link is not helpful to understand this. And seems different controls understand by different way the template.

2. What Palette property change the RadRibbonView.QuickAccessToolBar from black to something else? I test all properties and no one from them have any effect on this black line.

3. Next situation is with your control RadRibbonView. When I click ApplicationButton and open Backstage you see there is white Foreground on white background on RadRibbonBackstageItem.
If I remove from the code above Windows8TouchPalette.Palette.InvertedForegroundColor = Colors.White; then we have gray Foreground on white background but this change the grid column header Foreground to gray. This mean both GridColumnHeader and RadRibbonBackstageItem Foreground depend on InvertedForegroundColor.

Something is not right here. When I move with the mouse over the GridColumnHeader the Foreground is change from white to black ( as expected ), but when i move over the RadRibbonBackstageItem the color is not changed from white to black as i will expect. When RadRibbonBackstageItem depend on InvertedForegroundColor i will expect same behavior as GridColumnHeader when move with my mouse over it but it not happens.

In same time the background on RadRibbonBackstageItem not depend on LowColor as GridColumnHeader Background.

This is what I mean the different controls understand the template by a different why. The idea on the template is when I change the color on one place this to apply on every other places not to add manually a Background or Foreground on few controls.

4. Can you please help me how to apply this template to MS Controls? Because it is not very good half from the program to have a different style.

Thank you in advance.

Best regards,
Saykor


Sia
Telerik team
 answered on 09 Jul 2014
3 answers
166 views
As shown in the provided attachments the context menu is now over top of the selected item instead of being to one size of it.  This is with the 617 Q2 build.

Please address this.
Petar Mladenov
Telerik team
 answered on 09 Jul 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
PersistenceFramework
DataPager
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
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
SplashScreen
Rating
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?