Telerik Forums
UI for WPF Forum
2 answers
335 views
Hi There,
I am using the RadPane and RadDocumentPane in my application, can you please tell me what is difference between them ?

Regards,
Srinivas.

Ravi
Top achievements
Rank 1
 answered on 28 Nov 2012
4 answers
227 views
Hi, I am attempting to add a custom line or custom grid line annotation to my RadChart. I need to make the line dashed, but do so completely in c#, not using any XAML styles. How would I do this?

Also, how would I add my annotation to my legend, completely in code. I saw the example:
http://www.telerik.com/help/wpf/radchart-how-to-add-annotations-in-chart-legend.html, but that uses XAML styles, and I can't do that.

How would I ensure that the annotation appears in front of the data series? I.E. the bars for the bar chart are behind the annotation.

And finally, how would I add labels to annotations, again, in c# code only.
Petar Kirov
Telerik team
 answered on 27 Nov 2012
6 answers
221 views

This is based on the most recent build we have (downloaded this morning, RadControls_for_WPF_2011_3_1116_Dev_hotfix)

 

When we import a  file in docx format, and do a MailMerge() call, the fields merging appears to work perfectly, except that the style (or ‘format’ in MS Word parlance) is not maintained. Whether it’s bold, underlined, different font, different colour, it doesn’t matter, the text that is merged into that field always goes in with what appears to be the default RadDocument/RichTextDocument format (Verdana, 12 pt).

I’ve not been able to find any properties or anything that seem to indicate that merged values will override the styles/formats of the merge fields they’re replacing. It doesn’t appear as if it’s respecting the “Preserve formatting during updates” setting from MS Word

This is the code being used:

 

private RadDocument MergeDataFieldsWithDocument(RadDocument radDocument)

        {

 

            var mergeFieldsAndValues = DeriveValuesToMergeWithDocumentFields();

 

            radDocument.MailMergeDataSource.ItemsSource = mergeFieldsAndValues;

            return radDocument.MailMerge(false);

        }

 

        private static List<object> DeriveValuesToMergeWithDocumentFields()

        {

            return new List<object>

                       {

                           new

                               {

                                  DATE_TODAY = "test"

                               }

                       };

        }

How can we make it so that the merge fields use the correct format?

Thanks,

Brock

Petya
Telerik team
 answered on 27 Nov 2012
3 answers
309 views

Hi, I use the following code to overwrite the FilteringControl

public class ContainsFilteringControl: FilteringControl
    {
        public override void Prepare(GridViewColumn gridViewColumn)
        {
            base.Prepare(gridViewColumn);
  
            var vm = DataContext as FilteringViewModel;
  
            if (vm == null) return;
              
            if (!vm.Filter1.IsActive)
            {
                vm.Filter1.Operator = FilterOperator.Contains;
            }
  
            if (!vm.Filter2.IsActive)
            {
                vm.Filter2.Operator = FilterOperator.Contains;
            }
        }
  
    }

Then, in the code behind of the view,

public MyWindow(MyViewModel viewModel)
{
      DataContext = viewModel;
      this.radGrid.Columns[2].FilteringControl = new ContainsFilteringControl();
 }

After recompile and run the application, the filter changes to Contains.

However, when the filter is opened first time, the text boxes below the filter dropdowns are not shown.

When the filter window is opended the second time, the text boxes will appear.

Anything I can do to fix this?

Thanks
Rossen Hristov
Telerik team
 answered on 27 Nov 2012
1 answer
150 views
hi
i implement  Radtoolbar with basic functions but only copy undo and  cut commands are working . the others editingcommans and applicationcommand arn't working  sush as EditingCommands.DecreaseFontSize or increase
could you give me an example to implement it.
thanks by advance
Pavel R. Pavlov
Telerik team
 answered on 27 Nov 2012
4 answers
185 views
Hello,

I'm using internal build 2012.3.1017.40 and it seems the GridView is using the wrong locale (en-US instead of de-DE) when DataFormatString is applied to cells. Currency values are formatted as "$100.00" instead of "100,00 €". Is there a new configuration I have to set up or is it an issue with this build? I need to use the internal build because I'm using the WPF ReportViewer as well and there is that mean printing bug in the main release.

Kind regards
Markus
Markus Wolff
Top achievements
Rank 1
 answered on 27 Nov 2012
1 answer
423 views
I came across the need to be able to sort my ObservableCollections the other day and I found a nice code snippet demonstrating how to sort an ObservableCollection even if the collection type does not support IComparable. I added the ReverseCompare/Descending sort just in case. Anyhow thought it was a neat piece of code and hope it may help some others out there.

Enjoy!

public static class CollectionSorter  
    {  
        public static void Sort<T>(this ObservableCollection<T> collection, Comparison<T> comparison)  
        {  
            var comparer = new Comparer<T>(comparison);  
 
            List<T> sorted = collection.OrderBy(x => x, comparer).ToList();  
 
            for (int i = 0; i < sorted.Count(); i++)  
                collection.Move(collection.IndexOf(sorted[i]), i);  
        }  
 
        public static void DescendingSort<T>(this ObservableCollection<T> collection, Comparison<T> comparison)  
        {  
            var comparer = new ReverseComparer<T>(comparison);  
 
            List<T> sorted = collection.OrderBy(x => x, comparer).ToList();  
 
            for (int i = 0; i < sorted.Count(); i++)  
                collection.Move(collection.IndexOf(sorted[i]), i);  
        }       
    }  
 
    internal class Comparer<T> : IComparer<T>  
    {  
        private readonly Comparison<T> comparison;  
 
        public Comparer(Comparison<T> comparison)  
        {  
            this.comparison = comparison;  
        }
        #region IComparer<T> Members  
 
        public int Compare(T x, T y)  
        {  
            return comparison.Invoke(x, y);  
        }
        #endregion  
    }  
 
    internal class ReverseComparer<T> : IComparer<T>  
    {  
        private readonly Comparison<T> comparison;  
 
        public ReverseComparer(Comparison<T> comparison)  
        {  
            this.comparison = comparison;  
        }
        #region IComparer<T> Members  
 
        public int Compare(T x, T y)  
        {  
            return -comparison.Invoke(x, y);  
        }
        #endregion  
    } 

then you can use it on your ObservableCollections as such. 
private void Log(LogEntry log)  
        {  
            LoggedEvents.Add(log);  
            LoggedEvents.DescendingSort((x, y) => x.TimeStampString.CompareTo(y.TimeStampString));  
        }        
 
        private ObservableCollection<LogEntry> entries = new ObservableCollection<LogEntry>();  
        public ObservableCollection<LogEntry> LoggedEvents  
        {  
            get 
            {                  
                return entries;  
            }  
            set 
            {  
                entries = value;  
                RaisePropertyChanged(LoggedProperty);  
            }  
        } 
Jonas
Top achievements
Rank 1
 answered on 27 Nov 2012
1 answer
236 views
How to disable row edit mode? Leave only insert and delete.
Yoan
Telerik team
 answered on 27 Nov 2012
1 answer
245 views
Hi,

If the vertical scrollbar is used to scroll the list of dropdown items and then whilst the drop down is still displayed the applications main window is moved, the dropdown panel remains at it's former position and does not follow the location of the autocomplete edit box.

Is there a way to control this so that it either moves with the form or closes before the form is moved in the same way that a combobox would?

Attached screenshot illustrates the problem when using the WPF demo controls application.

Rgds
Graeme
Alek
Telerik team
 answered on 27 Nov 2012
0 answers
72 views
HI ,

i am using trail version of Test studio and i want to display the value of a variable. To display the value in C# we will use "MessageBox.Show("Value of the variable")". when i use this method i am getting one error message as namespace is not added as a hedder files, but i am not able to see in the list namesapces because i have not added repective *.dll files. can any one please let me know about adding of *.dll files.

Thanks
satyanarayana
S
Top achievements
Rank 1
 asked on 27 Nov 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?