Telerik Forums
UI for WPF Forum
7 answers
151 views
Hi,

We are using telerik radRichTextBox. The version is 2012.3.1129.45.

1. Picture button in ribbon menu
2. Select an image file
3. Use the context menu to "Text Wrapping" and select "Square".
4. Moving the picture with the mouse pointer.

After step 4 the inserted pictures dissapers.
Somtimes it reappers when I insert another picture.

Kind regards

/Andreas

Anders
Top achievements
Rank 1
 answered on 14 Mar 2014
6 answers
316 views
Hi 
I am iterating through the rows and columns of the grid view like this :
foreach (var row in radGridView.Items)
                    {
                        foreach (var column in HeaderInfo)
                        {
                            string sUniquename = uniqueNames[iColumn];
                            var boundColumn = radGridView.Columns[sUniquename] as GridViewBoundColumnBase;
                            if (boundColumn != null)
                            {                                string data = string.Format("{0}", boundColumn.GetValueForItem(row));}
                            iColumn += 1;}}
The thing is that its too slow ...for a grid with say 80k rows it is taking 5 minuted to complete this loop...I guess internally it is building up the rows internally as our grid has virtualization enabled.

Please suggest if something can be done on this.
                        
                    
Yoan
Telerik team
 answered on 13 Mar 2014
2 answers
117 views
I got this error while updating the data of schedule view in another thread , not in dispatching thread. Per the exception message, the collection was changed already while it was being enumerated, in line 4625 in ScheduleViewBase.cs, which was triggered in the method OnQueryGoToNextAppointmentCanExecuted in ScheduleViewBase.

The situation is that I have to update the data in a timer , which will execute update in another thread. Could you please give some suggestion about how to fix it, or some work around? I was trapped for almost a week.

The message of the exception is attached.
Thanks a lot.
Konstantina
Telerik team
 answered on 13 Mar 2014
1 answer
164 views
I have a custom template for my Appointments , the main problem is Touch events are not working

I  can click or double click in my custom Appointment but  I can not select  the appointments with touch.

Here is my xaml.


My DataTemplate to fill the  content 
 <DataTemplate x:Key="PatientAppointmentDataTemplate">


        <Grid MinHeight="150">
          
<---> Content

        </Grid>


     </DataTemplate>

My Selector.

<selectors:AppointmentSelector x:Key="DefaultAppointmentStyleSelector">
        <selectors:AppointmentSelector.TodayAppointmentSelector>
            <Style TargetType="telerik:AppointmentItem">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="telerik:AppointmentItem">
                            <ContentControl DataContext="{Binding .}">


                                <i:Interaction.Triggers>

///HACK TO FORCE TO SELECT AN APPOINTMENT

                                    <i:EventTrigger EventName="TouchDown" SourceObject="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:AppointmentItem}}}">
                                        <ei:ChangePropertyAction PropertyName="SelectedAppointment"
                                                                 TargetObject="{Binding RelativeSource={RelativeSource FindAncestor,
                                                                                                                       AncestorType={x:Type telerik:RadScheduleView}}}"
                                                                 Value="{Binding}" />

                                        <i:InvokeCommandAction Command="telerik:RadScheduleViewCommands.EditAppointment" />
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>

                                <Grid x:Name="Root"
                                      Background="Gray"
                                      Focusable="True">
                                    <Grid.InputBindings>
                                        <MouseBinding Command="telerik:RadScheduleViewCommands.EditAppointment" MouseAction="LeftDoubleClick" />
                                    </Grid.InputBindings>

                                    <ContentPresenter ContentTemplate="{StaticResource PatientAppointmentDataTemplate}" />
                                </Grid>
                            </ContentControl>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </selectors:AppointmentSelector.TodayAppointmentSelector>

My Slots have IsReadOnly= False.

I handled  ShowDialog to personalize the edit or delete appointments.

         this.scheduleView.ShowDialog += scheduleView_ShowDialog;


 private async void scheduleView_ShowDialog(object sender, ShowDialogEventArgs e)
        {
            e.Cancel = true;
           /// My code
        }

But this event does not fire too, when I do double touch simulating MouseDoubleClick.


Please help me. Thank you.







Kalin
Telerik team
 answered on 13 Mar 2014
1 answer
266 views
Hello,

I'm trying to display a tree layout with multiple roots - in the sample I attached both "a" and "f" nodes are top level nodes - however only a gets arranged correctly. I was hoping the auto format display something more similar to the image in preferred.png

How does the multiple roots work? is this its intention to specify nodes on the first level? The layout is better if I add a single top level node (called "start" in sample app - you have to uncomment the code), but I don't really want an unnecessary single top node.

Any help would be really appreciated.

Many Thanks

Gary Howlett

As cant post .zip sample files I placed on my OneDrive here http://1drv.ms/1fQ6pYD
Pavel R. Pavlov
Telerik team
 answered on 13 Mar 2014
1 answer
366 views
I have a grid with 2 subgrids. This hierachy is defined in the xaml with the ChildTableDefinitions property. The child grids have
grd.MaxHeight = double.PositiveInfinity;
in order to avoid a clutter of scrollbars. Also row virtualization has been turned off for as well the main grid as the child grids.

Now I'm implementing a refresh operation. During this, I want to reselect the item that was selected before the refresh was started (there is only one item selected in all these grids). I do this by expanding the appropriate rows until I reach the grid with the item to be selected. Then I set that grid's SelectedItem property.

So far so good. For obvious reasons I want to scroll the selected item back into view. When the selected row was in the main grid, I can just perform a
grd.ScrollIntoView(objSel);
But when I do this for a childgrid, nothing happens. I presume because the child grid doesn't have a scrollbar and as far as this grid is concerned, the selected row is in view. Also when I try
grdMain.ScrollIntoView(objSel);
nothing happens. I guess because objSel is not in the ItemsSource of the main grid (I didn't expect it to work, but I had to try). Also
grd.BringIntoView();
did not work out.

So I wonder what is a correct approach to scroll the selected item into view.

Thanks in advance,
   Herre

[ OS: W7; Telerik: WPF 2013.3.1316.40 ]
Yoan
Telerik team
 answered on 13 Mar 2014
5 answers
195 views
I've got a FadeTransition set up, with some not too complicated content, which is simply supposed to fade. Instead, it zooms the content in, and then fades. It's like it's taking a snapshot of the old content at the wrong size or something. I can't quite reproduce it outside of the project I'm working on. As soon as the Content is changed, the transition control zooms in on the text, and then fade/zooms it. How do I make this simply a fade, without a zoom?

<telerik:RadTransitionControl
    Duration="0:0:1"
    Content="{TemplateBinding CurrentThreshold}">
    <telerik:RadTransitionControl.Transition>
        <telerik:FadeTransition />
    </telerik:RadTransitionControl.Transition>
    <telerik:RadTransitionControl.ContentTemplate>
        <DataTemplate
            DataType="{x:Type local:ServiceLevelThreshold}">
            <Grid>
                <Rectangle
                    Opacity=".75"
                    Fill="{Binding Background}" />
                <TextBlock
                    Margin="4"
                    Foreground="{Binding Foreground}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Style="{StaticResource ServiceLevelBlockContentTextBlock}"
                    Text="{Binding Value, RelativeSource={RelativeSource AncestorType={x:Type local:ServiceLevelBlock}}}"
                    FontSize="30" />
 
            </Grid>
        </DataTemplate>
    </telerik:RadTransitionControl.ContentTemplate>
</telerik:RadTransitionControl>
Vladi
Telerik team
 answered on 13 Mar 2014
2 answers
128 views
When you place a transition control in a ViewBox (specifically with the Fade transition, but mostly on all of them), it does a strange scaling.  The text starts out tiny, then goes large, then fades.  In other examples I have done, it starts out almost 2x as large as it should and then fades normally.  Is there a way to stop if from doing this?

See the below code example:

 
<Window x:Class="WpfApplication20.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <telerik:FadeTransition x:Key="fadeTransition" />
    </Window.Resources>
    <Grid>
        <Viewbox>
            <telerik:RadTransitionControl x:Name="tran" Transition="{StaticResource fadeTransition}" Content="{Binding Text}">
                <telerik:RadTransitionControl.ContentTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding}"></TextBlock>
                    </DataTemplate>
                </telerik:RadTransitionControl.ContentTemplate>
            </telerik:RadTransitionControl>
        </Viewbox>
    </Grid>
</Window>

    public partial class MainWindow : Window , INotifyPropertyChanged
    {
        DispatcherTimer _timer = null;
        public MainWindow()
        {
            InitializeComponent();
            _timer = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromSeconds(1);
            _timer.Tick += _timer_Tick;
            this.DataContext = this;
            _timer.Start();
        }
 
        int count = 0;
        private string _text = "0";
        public string Text
        {
            get
            {
                return _text;
            }
            set
            {
                if (_text != value)
                {
                    _text = value;
                    this.NotifyOfPropertyChange("Text");
                }
            }
        }
 
        #region INotifyPropertyChanged Members
 
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyOfPropertyChange(string prop)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(prop));
            }
        }
        #endregion
 
        void _timer_Tick(object sender, EventArgs e)
        {
            count++;
            Text = count.ToString();
        }
}


Vladi
Telerik team
 answered on 13 Mar 2014
1 answer
156 views
Hi,

I'm fairly new to WPF and I'm trying to achieve a look to my datagrids similar to yours from the demo applications.

In your demos, the radgridview(and other controls too like the listview) are wrapped by a telerikQuickstart:Quickstart.ExampleHeader object.

I'm trying to do the same but can't. Can you please point me in the right direction on how I would be able to wrap my datagrid in a similar object, and ideally
change the background color to a deep blue instead of the purple?

Thanks
aronluc28
Top achievements
Rank 1
 answered on 12 Mar 2014
2 answers
133 views
                   When I close a cofirm radwindow  (showdialog()), it won't focus on a textbox.  If I change it to a regular wpf window and close it, everything is fine.
When I debug it and step through it, it works so it could be some race condition.

RadWindow.Confirm(new DialogParameters(){
 Owner = myMainpage,
                    DialogStartupLocation = WindowStartupLocation.CenterOwner,
                    Content =
                        message,
                    Closed = Cancel_Click
 ...
        private void Cancel_Click(object sender, Telerik.Windows.Controls.WindowClosedEventArgs e)
        {

            Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, (System.Threading.ThreadStart)delegate()
            {

                myTextBox.Focus();
            });
//set the focus here
danparker276
Top achievements
Rank 2
 answered on 12 Mar 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
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?