Telerik Forums
UI for WPF Forum
3 answers
259 views

Hi,

I want to generate TreeListView Columns dynamically and populate them with data.

 Regards

Stefan
Telerik team
 answered on 11 Sep 2015
5 answers
363 views

I am using the Visual Studio 2013 Dark Theme (using Implicit styles) and for the most part everything looks great out of the box.  One issue that I have run across is that the Context Menu that shows up for a TextBox (Cut, Copy, Paste) is not themed at all.  Additionally, using the RadRibbonWindow, when clicking on the Icon, the Context Menu that shows up (Restore, Move, Size, Minimize, Maximize, Close) is not themed at all.  I have to think that I am missing a setting somewhere for these to be themed but I cannot find it anywhere.  

 Can you help me out?

 

Jon

Evgenia
Telerik team
 answered on 11 Sep 2015
4 answers
159 views

Hi,

When the value in a cell containing a formula gets updated the text alignment is incorrect. See cell D2 in attachment after I put a 1 in cell B2. There is plenty of room for the value to be displayed correctly. The formula in D2 is =B2*C2.

I have tested this on the Telerik demos and can get the same thing to happen on there so it has nothing to do with my code.

This makes this control very unusable and I have customers complaining about this.

Thanks

Anthony

Tanya
Telerik team
 answered on 11 Sep 2015
1 answer
173 views

Hello everyone,

 We created a Custom Control which has a GridView as a part of it. We use the AutoGeneratingColumns functionality and the DisplayAttribute to define the header text. That works perfect. We want to set the Columns to a fixed width, and it would be great to do this with an Attribute or some sort of other way.

 Does anyone have a suggestion? We don't want to change the fact that the columns are auto generated.

Thanks for any help...

Ivan Ivanov
Telerik team
 answered on 11 Sep 2015
1 answer
326 views
I need to take pictures and store them on a Windows 8.1 machine.  Do you have a Camera control for WPF?  If not, what do you recommend?
Tanya
Telerik team
 answered on 11 Sep 2015
1 answer
144 views

I need to add values to the dropdown list of Duration so that they are 10 seconds, 20 seconds, 45 seconds, etc.  So I am able to add them okay to the list:

 

 var durationPicker = sender as DurationPicker;
            durationPicker.Items.Add("5 seconds");
            durationPicker.Items.Add("10 seconds");
            durationPicker.Items.Add("0.5 minutes");
            durationPicker.Items.Add("2 minutes");
            durationPicker.Items.Add("7 minutes");

 

However, picking any seconds doesn't update the End Time like if I picked 2 minutes.  It seems to ignore anything that is seconds.  Could you show me how to make seconds increments work on the Duration so it effects the End Date?   We often schedule items every 60 seconds. Or 30.

 

 

 

Nasko
Telerik team
 answered on 11 Sep 2015
5 answers
201 views

Hi Telerik:

I believe I have found a bug relating to how the RadRibbonTab handles things when its ItemsSource is set.

 Please see the attached demo app.

 Am I doing something wrong?  If so, please advise.


<Window
        xmlns:local="clr-namespace:WpfApplication5"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="WpfApplication5.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="659" Width="1131.575">
    <Grid>
        <ListBox x:Name="List1" HorizontalAlignment="Left" Width="483" Height="73" VerticalAlignment="Top" Margin="30,77,0,0"/>
        <ListBox x:Name="List2" Margin="30,223,0,0" HorizontalAlignment="Left" Width="483" Height="84" VerticalAlignment="Top"/>
        <Button x:Name="btnBindList1" Content="Bind List 1" HorizontalAlignment="Left" Margin="513,77,0,0" VerticalAlignment="Top" Width="102" Click="btnBindList1_Click"/>
        <Button x:Name="btnBindList2" Content="Bind List 2" HorizontalAlignment="Left" Margin="518,223,0,0" VerticalAlignment="Top" Width="102" Click="btnBindList2_Click"/>
        <Label x:Name="label" Content="First - Click "Bind List 1".  The items will bind.  This is what I expect to happen." HorizontalAlignment="Left" Margin="30,43,0,0" VerticalAlignment="Top"/>
        <telerik:RadRibbonView x:Name="radRibbonView" VerticalAlignment="Top" Margin="30,385,108,0">
            <telerik:RadRibbonTab Header="RibbonTab" x:Name="radRibbonTab"/>
        </telerik:RadRibbonView>
        <Button x:Name="btnBindRibbon" Content="Bind Ribbon to New Tab" HorizontalAlignment="Left" Margin="518,360,0,0" VerticalAlignment="Top" Width="158" Click="btnBindRibbon_Click"/>
        <Button x:Name="btnBindRibbon_Copy" Content="Bind Ribbon Again" HorizontalAlignment="Left" Margin="518,571,0,0" VerticalAlignment="Top" Width="193" Click="btnBindRibbon_Click"/>
        <Label x:Name="label_Copy" Content="Second - Click "Bind List 2".  The list is bound and visual items jump to List2.  This is what I expect to happen." HorizontalAlignment="Left" Margin="30,192,0,0" VerticalAlignment="Top"/>
        <Label x:Name="label_Copy1" Content="Third - Click "Bind Ribbon to New Tab".  The list is bound and visual items jump into the ribbon.  This is also what I expect to happen." HorizontalAlignment="Left" Margin="30,321,0,0" VerticalAlignment="Top" Width="799" Height="27"/>
        <Label x:Name="label_Copy2" Content="Last - Click "Bind Ribbon Again" (it calls the same code as above).  When I do this, I get an error.  I expect items to jump like they did the first time." HorizontalAlignment="Left" Margin="30,537,0,0" VerticalAlignment="Top" Width="799" Height="27"/>
    </Grid>
</Window>

 

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
 
namespace WpfApplication5 {
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window {
         
 
        System.Collections.ObjectModel.ObservableCollection<object> items;
 
        public MainWindow() {
            InitializeComponent();
            items = new System.Collections.ObjectModel.ObservableCollection<object> { "a", "b", "c" };
 
            items.Add(new Button() { Content = "Test Button" });
            items.Add(new TextBox() { Text = "Test Textbox!" });
        }
 
        private void Button_Click_1(object sender, RoutedEventArgs e) {
            Button button = sender as Button;
            string clickedString = button.DataContext as string;
            items.Remove(clickedString);
 
        }
 
        private void btnBindList1_Click(object sender, RoutedEventArgs e) {
            e.Handled = true;
            List1.ItemsSource = items;
 
        }
 
        private void btnBindList2_Click(object sender, RoutedEventArgs e) {
            e.Handled = true;
            List2.ItemsSource = items;
        }
 
        private void btnBindRibbon_Click(object sender, RoutedEventArgs e) {
            e.Handled = true;
            var Tab = new Telerik.Windows.Controls.RadRibbonTab() { Header = "New Tab" };
            radRibbonView.Items.Add(Tab);
            radRibbonView.SelectedItem = Tab;
 
            Tab.ItemsSource = items;
 
             
             
        }
    }
}

Petar Marchev
Telerik team
 answered on 11 Sep 2015
1 answer
732 views

Hi,

 I am trying integrating a rad PDFViewer which show a pdf generated in a Stream to print it, at first, i would like to show the pdf document with a scalefactor of 0.5 and give the user the possibility to increase or decrease the zoom. In way to perform that, i added a RadSlider and bound the scalefactor of the pdf viewer with the value of the rad slider like show the code below (The problem i encounter is that the scalefactor is initially set to 1, however the pdf viewer width allow to show the 0.5 scale value) : 

<telerik:RadPdfViewer x:Name="pdfViewer"
                      Grid.Row="1"
                      Width="450"
                      DocumentSource="{Binding Document,
                                               Mode=TwoWay}"
                      ScaleFactor="{Binding ElementName=ZoomSlider,
                                            Path=Value,
                                            Mode=TwoWay,
                                            UpdateSourceTrigger=PropertyChanged}"
                      ScaleMode="FitToWidth"
                      ScrollViewer.VerticalScrollBarVisibility="Auto" />

Then the code of the RadSlider:

<telerik:RadSlider x:Name="ZoomSlider"
                   Grid.Column="0"
                   Width="300"
                   HorizontalAlignment="Center"
                   HandlesVisibility="Visible"
                   Maximum="1.5"
                   Value="0.5"
                   Minimum="0"
                   TickFrequency="0.25"
                   TickPlacement="TopLeft">
    <telerik:RadSlider.TickTemplate>
        <DataTemplate>
            <Grid>
                <TextBlock Text="{Binding}" />
            </Grid>
        </DataTemplate>
    </telerik:RadSlider.TickTemplate>
</telerik:RadSlider>

 
Nikolay Demirev
Telerik team
 answered on 10 Sep 2015
2 answers
225 views

 

The simple Rad controls can be processed by System.Windows.Markup.XamlWriter correctly, but when process the RadRichTextBox, "stackoverflow" occured.

I have made the following test:

1.Create a buttton and a normal RichTextBox with name "richTextBox"

2.Write the following codes in the click event of the button

            string data = System.Windows.Markup.XamlWriter.Save(richTextBox.Document);
            FileStream fs = new FileStream("C:/TEST.XAML", FileMode.Create);
            StreamWriter sw = new StreamWriter(fs);
            sw.WriteLine(data);
            sw.Close();
            fs.Close();

3.Add the Telerik InlineContainer in to richtextbox and click the button to save the flowdocument into xaml file.

      For the simple controls like Radbutton or RadMaskedTextInput , it's okay:

           Add the following codes in desgine screen:

                     <InlineUIContainer>
                        <telerik:RadMaskedTextInput TextMode="PlainText"  />
                    </InlineUIContainer>

           Got the result:

              <FlowDocument PagePadding="5,0,5,0" AllowDrop="True" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"><Paragraph><telerik:RadMaskedTextInput Value="asdaasdasd" OriginalValue="{x:Null}" SelectionLength="0" SelectionStart="10" Text="asdaasdasd" TextMode="PlainText" IsEmpty="False" HasErrors="False"><telerik:RadMaskedTextInput.CopyCommand><telerik:DelegateCommand /></telerik:RadMaskedTextInput.CopyCommand><telerik:RadMaskedTextInput.ClearCommand><telerik:DelegateCommand /></telerik:RadMaskedTextInput.ClearCommand><telerik:RadMaskedTextInput.CutCommand><telerik:DelegateCommand /></telerik:RadMaskedTextInput.CutCommand><telerik:RadMaskedTextInput.PasteCommand><telerik:DelegateCommand /></telerik:RadMaskedTextInput.PasteCommand></telerik:RadMaskedTextInput></Paragraph></FlowDocument>

 

        Then, for the RadRichTextBox,  it can be shown in RichTextBox correctly.

                    <InlineUIContainer>
                        <telerik:RadRichTextBox x:Name="radRichTextBox" Height="100" Width="120" />
                    </InlineUIContainer>

         But  it failed to saved as xaml with "System.StackOverflowException" 

         Is there any workaround?

         (I used to insert RadRichTextBox into RadRichTextBox, but it also has the cursor problem as my another thread "Cursor Focus problem of TextBox in RadRichTextBox".....)

        

Ruyu
Top achievements
Rank 1
 answered on 10 Sep 2015
2 answers
286 views

Hey guys,

Is there anyway to have a move grip/handle to move the shape instead/beside moving by dragging the shape itself ?

 

Like the attached image.

 

 I have a scenario which I there are shapes with semi transparent content over each other so I don't ant to change the z order index but I have a listbox that contains the name of the shapes so when user select the an item  it selects the shape which is not the top most shape. What I want to do is to have a move grip/handle to allow the user move the shape in the designer area by dragging the grip handle without messing with selecting other shapes. It would be exactly similar with what existing rotation grip behaves.

The reason why I am asking this is because currently if the user click inside the designer area to drag the selected shape which is not the most top the diagram tries to select the top most but I don't want the selection changes but I want the user be able to drag the selected shape which is already selected and it is not the top most shape. 

 

Bruno
Top achievements
Rank 1
 answered on 09 Sep 2015
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?