Telerik Forums
UI for WPF Forum
3 answers
198 views
Hi Team,
 I am using RadBook for showing the PDF files. But when I am loading big PDF file ,PDFFormateProvider throw Out of memory exception error.
Please help me to find out the solution.

Thanks,
MAndeep
Kammen
Telerik team
 answered on 21 Aug 2012
2 answers
117 views

Hi,

I've notcied that when I try to print a document but push the cancel button the document is still sent to the printer.
Has anyone else noticed this?

I'm using libraries 2012.2.725.40.

Here's my print method:

private void btnPrint_Click(object sender, RoutedEventArgs e)
{
this.radRichTextBox.Print("TAS2 Spec", PrintMode.Native);
}

Thanks for your time,

Rob

Vasil
Telerik team
 answered on 21 Aug 2012
1 answer
168 views
I am trying to apply the telerik metro theme to the WPF controls. While most controls looks OK, the PasswordBox somehow received a strange double border (see attached image). This issue seem to only affect the Metro Theme, other themes such as the Windows7 Theme looks ok.

<Window x:Class="RadControlsWpfApp3.InputsWindow"
        Title="InputsWindow" Height="400" Width="300">
    <Window.Resources>
 
        <telerik:MetroTheme x:Key="Theme" />
 
        <Style TargetType="ScrollViewer">
            <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" />
        </Style>
        <Style TargetType="TextBox">
            <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" />
        </Style>
        <Style TargetType="Button">
            <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" />
        </Style>
        <Style TargetType="CheckBox">
            <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" />
        </Style>
        <Style TargetType="RadioButton">
            <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" />
        </Style>
        <Style TargetType="ListBox">
            <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" />
        </Style>
        <Style TargetType="PasswordBox">
            <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" />
        </Style>
    </Window.Resources>
    <Grid>
        <StackPanel Margin="5">
            <Label Content="Username" />
            <TextBox />
            <Label Content="Password" />
            <PasswordBox />
            <Label Content="Gender" />
            <StackPanel Orientation="Horizontal">
                <RadioButton Content="Male" />
                <RadioButton Content="Female" />
            </StackPanel>
            <Label Content="list" />
            <ListBox>
                <ListBoxItem>test1</ListBoxItem>
                <ListBoxItem>test2</ListBoxItem>
                <ListBoxItem>test3</ListBoxItem>
            </ListBox>
            <CheckBox Content="Agree" />
            <Button Content="Submit" />
        </StackPanel>
    </Grid>
</Window>
Yoan
Telerik team
 answered on 21 Aug 2012
8 answers
206 views
Hi


Is it possible to apply and use transition effects when the selected pane in a pane group changes? How can this be done?

Tom Davies
Yana
Telerik team
 answered on 21 Aug 2012
1 answer
126 views
Hello,

In a RadPaneGroup with a RadGridView we are showing some detials of a SQL search. In the background is a ViewModel and one of the property contains the resultrecords as array. Each new search request will create a new array of records and through a binding it changes the ItemsSource property of RadGridView. 


new Version 2012.2.725.40: the focus will jump into the RadGridView when RadPaneGroup is floating
old Version 2012.1.215.40: its all ok, the Fosuce stay in e.g. TextBox

a SampleApp below

<Window x:Class="RadGridViewFocusStealing.MainWindow"
        xmlns:RadGridViewFocusStealing="clr-namespace:RadGridViewFocusStealing" Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="29" />
            <RowDefinition Height="259*" />
        </Grid.RowDefinitions>
        <Grid.DataContext>
            <RadGridViewFocusStealing:GridDataContextViewModel/>
        </Grid.DataContext>
        <TextBlock  Grid.Row="0" Text="Make the RadPaneGroup as floating. Select a record inside of the grid, than add some new records while typing in the TextBox below. You will see the focus will lost. If the RadPaneGroup is docked its all fine." TextWrapping="Wrap" />
        <telerik:RadWatermarkTextBox  Grid.Row="1" Text="{Binding Path=DoSomethingOnChange, UpdateSourceTrigger=Explicit}" KeyUp="TextBox_KeyUp" Margin="2" >
            <telerik:RadWatermarkTextBox.WatermarkContent>
                <TextBlock Text="Just type any text and press ↵ Enter to apply" Foreground="Gray"/>
            </telerik:RadWatermarkTextBox.WatermarkContent>
        </telerik:RadWatermarkTextBox>
        <telerik:RadDocking  Grid.Row="2">
            <telerik:RadDocking.Items>
                <telerik:RadSplitContainer x:Name="radSplitContainer" >
                    <telerik:RadSplitContainer.Items>
 
                        <telerik:RadPaneGroup >
                            <telerik:RadPaneGroup.Items>
                                <telerik:RadPane>
                                    <telerik:RadGridView
                                                 AutoGenerateColumns="False"
                                                 ItemsSource="{Binding Path=DataItems}" ShowGroupPanel="False">
                                        <telerik:RadGridView.Columns>
                                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Property1}"/>
                                        </telerik:RadGridView.Columns>
                                    </telerik:RadGridView>
                                </telerik:RadPane>
                            </telerik:RadPaneGroup.Items>
                        </telerik:RadPaneGroup>
 
                    </telerik:RadSplitContainer.Items>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.Items>
        </telerik:RadDocking>
    </Grid>
</Window>



using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Telerik.Windows.Controls.Docking;
 
namespace RadGridViewFocusStealing
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            radSplitContainer.InitialPosition = DockState.FloatingDockable;
        }
 
        private void TextBox_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
        {
            if (e.Key == Key.Enter && e.KeyboardDevice.Modifiers == ModifierKeys.None)
            {
                var b = ((TextBox)sender).GetBindingExpression(TextBox.TextProperty);
                if (b != null)
                    b.UpdateSource();
            }
        }
    }
 
    public class GridDataContextViewModel : INotifyPropertyChanged
    {
        private IEnumerable<GridDataItem> _dataItems;
 
        public GridDataContextViewModel()
        {
            _dataItems = new GridDataItem[] { new GridDataItem() { Property1 = "Foo" }, new GridDataItem() { Property1 = "Baa" } };
        }
 
        private string _doSomethingOnChange;
 
        public string DoSomethingOnChange
        {
            get { return _doSomethingOnChange; }
            set
            {
                _doSomethingOnChange = value;
                OnNotifyPropertyChanged("DoSomethingOnChange");
 
                // As simulation, creating a new data array (e.g. a result of a SQLQuery as array) for GridView.ItemsSource
                DataItems = _dataItems.Union(new GridDataItem[] { new GridDataItem { Property1 = value } }).ToArray();
            }
        }
 
        public IEnumerable<GridDataItem> DataItems
        {
            get { return _dataItems; }
            private set
            {
                if (_dataItems != value)
                {
                    _dataItems = value;
                    OnNotifyPropertyChanged("DataItems");
                }
            }
        }
 
        private void OnNotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
 
        public event PropertyChangedEventHandler PropertyChanged;
    }
 
    public class GridDataItem
    {
        public string Property1 { get; set; }
    }
}


Ulrich
Top achievements
Rank 1
 answered on 21 Aug 2012
1 answer
147 views
All of a sudden I can't run any app with telerik WPF.  I upgraded to Q2 2012 and it crashed visual studio without completing.  Now I can't run existing projects or start new ones using WPF.  I tried uninstalling and reinstalling but no difference. 
Chavdar Dimitrov
Telerik team
 answered on 21 Aug 2012
0 answers
253 views
Hi,

in scheduleview I am do following:
- every time the visible range is changed I set the AppointmentsSource = null. After that I add some new Appointments (which fit into the visible range). After that I call UpdateLayout().

            scheduleView.BeginInit();
            scheduleView.AppointmentsSource = null;
            scheduleView.AppointmentsSource = observableAppointments;
            scheduleView.EndInit();
            scheduleView.UpdateLayout();

This is ok, when I click the back and forward buttons on schedule view. But when I change from Week View into Day View, I get an exception. I debugged schedule view and got the exception in AppointmentsPanel.cs in

private void UpdateMaxDesiredSize(GroupHeader header, bool isHorizontal)
        {
            header.Measure(infinity);

            int level = header.Level;
            Size desiredSize = header.DesiredSize;
            int adjustLevel = level - 1;

            double levelMaxDesiredLength = this.GetMaxDesiredLength(adjustLevel);

            double length;
            if (isHorizontal)
            {
                length = header.DesiredSize.Width - header.BorderThickness.Right;
            }
            else
            {
                length = header.DesiredSize.Height - header.BorderThickness.Bottom;
            }
            levelMaxDesiredLength = Math.Max(levelMaxDesiredLength, length);
            this.headerMaxLengthLevels[adjustLevel] = levelMaxDesiredLength;  Here headerMaxLengthLevels has zero entries.
        }


What's the reason for this?

Regards,
Ronald
Ronald
Top achievements
Rank 1
 asked on 21 Aug 2012
1 answer
127 views
Hello,
I am new to telerik controls. today i try to show a bar chart with data binding, but always unable to see the bars, only empty chart. below is the xaml and view model. thanks in advance for your help!

Thank you,
Alex

<UserControl
    xmlns:MHSVisualBoard_ViewModels="clr-namespace:MHSVisualBoard.ViewModels"
    mc:Ignorable="d"
    x:Class="MHSVisualBoard.MissionsByForklift"
    x:Name="UserControl"
    d:DesignWidth="582" d:DesignHeight="400" MaxWidth="550" MaxHeight="300" Width="550" Height="Auto">
 
    <Grid x:Name="LayoutRoot">
        <UniformGrid Margin="0" Rows="2" Columns="1">
            <telerik:RadChart x:Name="charMissionsTrend" Content="" Style="{DynamicResource RadChartStyle}" OverridesDefaultStyle="True"/>
            <telerik:RadChart x:Name="chartMissionAssignedVsFinished" Content="" Style="{DynamicResource RadChartStyle}" OverridesDefaultStyle="True" ItemsSource="{Binding Data, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
                <telerik:RadChart.DataContext>
                    <MHSVisualBoard_ViewModels:MissionsByForkliftViewModel>
                        <MHSVisualBoard_ViewModels:MissionsByForkliftViewModel.Data>
                            <MHSVisualBoard_ViewModels:ForkliftMissions AssignedMissions="12" FinishedMissions="3" ForkliftId="E1"/>
                            <MHSVisualBoard_ViewModels:ForkliftMissions AssignedMissions="15" FinishedMissions="9" ForkliftId="E2"/>
                        </MHSVisualBoard_ViewModels:MissionsByForkliftViewModel.Data>
                    </MHSVisualBoard_ViewModels:MissionsByForkliftViewModel>
                </telerik:RadChart.DataContext>
                <telerik:RadChart.SeriesMappings>
                    <telerik:SeriesMapping SeriesDefinition="{DynamicResource ISeriesDefinitionBarOne}">
                        <telerik:ItemMapping DataPointMember="XCategory" FieldName="{Binding Data[0].ForkliftId}"/>
                        <telerik:ItemMapping FieldName="{Binding Data[0].AssignedMissions}" DataPointMember="YValue"/>
                    </telerik:SeriesMapping>
                </telerik:RadChart.SeriesMappings>
            </telerik:RadChart>
        </UniformGrid>
    </Grid>
</UserControl>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.Windows.Controls;
using System.Collections.ObjectModel;
using System.ComponentModel;
namespace MHSVisualBoard.ViewModels
{
    public class MissionsByForkliftViewModel : ViewModelBase
    {
        public MissionsByForkliftViewModel()
        {
            _data = new ObservableCollection<ForkliftMissions>();
        }
 
        public ObservableCollection<ForkliftMissions> Data
        {
            get
            {
                return _data;
            }
            set
            {
                if (value != _data)
                {
                    _data = value;
                    this.OnPropertyChanged("Data");
                }
            }
        }
 
        private ObservableCollection<ForkliftMissions> _data;
    }
 
    public class ForkliftMissions : INotifyPropertyChanged
    {
        public ForkliftMissions()
        {
 
        }
 
        public event PropertyChangedEventHandler PropertyChanged;
 
        public string ForkliftId
        {
            get
            {
                return _forkliftId;
            }
            set
            {
                _forkliftId = value;
            }
        }
 
        public int AssignedMissions
        {
            get
            {
                return _assignedMissions;
            }
            set
            {
                if (value != _assignedMissions)
                {
                    _assignedMissions = value;
                    if (PropertyChanged != null)
                        PropertyChanged(this, new PropertyChangedEventArgs("AssignedMissions"));
                }
            }
        }
 
        public int FinishedMissions
        {
            get
            {
                return _finishedMissions;
            }
            set
            {
                if (value != _finishedMissions)
                {
                    _finishedMissions = value;
                    if (PropertyChanged != null)
                        PropertyChanged(this, new PropertyChangedEventArgs("FinishedMissions"));
                }
            }
        }
 
        private string _forkliftId;
        private int _finishedMissions;
        private int _assignedMissions;
    }
}
Petar Marchev
Telerik team
 answered on 21 Aug 2012
1 answer
153 views
Hello ,

How do I know that up/down button has pressed. I tried it using valueChanged event but I could not figure out that the value has changed by either from the Textbox or from the up/down buttons.

Thanks in Advance.

Regards,
KK

Ivo
Telerik team
 answered on 21 Aug 2012
2 answers
77 views
I use to display RadCartesianChart Candlestick for software exchange.

when I board units on the X axis DateTimeContinuousAxis MajorStepUnit = "Hour" or minutes I would like to define the hours of closure of stock exchanges
  and for the weekend, so it does not appear on the graph as the data is empty periods for its

Thanks.
Nikolay
Telerik team
 answered on 21 Aug 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
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?