Telerik Forums
UI for WPF Forum
2 answers
321 views
hi,

I'm using WPF RadContextMenu and when I right-click the context menu gets opened at the left side of mouse click position, what should I change so that it opens on the right side from the mouse click position?

This happens for me on all the Telerik demos as well so can't find a sample that shows what to set.

I have tried DropDownPlacement to Left for RadMenuItems but it didn't make a difference. I've also tried setting the menu Placement to PlacementMode.MousePoint - still the same.

thanks!



arto
Top achievements
Rank 1
 answered on 09 Jul 2014
4 answers
134 views
Doing a very simple shapefile based map.  I can see the map in preview, but not when I debug.  shapefiles are in a folder called Shapes just off the project root.

  <telerik:RadMap HorizontalAlignment="Left" Center="40,-74" VerticalAlignment="Top" Height="500" Width="600">
            <telerik:RadMap.Provider>
                <telerik:EmptyProvider />
            </telerik:RadMap.Provider>
            <telerik:InformationLayer x:Name="informationLayer" >
                <telerik:InformationLayer.Reader>
                    <telerik:MapShapeReader x:Name="xShapReader"
                                            Source="pack://siteoforigin:,,,/Shapes/cb_2013_us_state_500k.shp" 
                                            DataSource="pack://siteoforigin:,,,/Shapes/cb_2013_us_state_500k.dbf" 
                                            PreviewReadCompleted="MapShapeReader_PreviewReadCompleted" />
                </telerik:InformationLayer.Reader>


                <telerik:InformationLayer.ShapeFill>
                    <telerik:MapShapeFill Fill="#FFF0D9" Stroke="#B1946D" StrokeThickness="1" />
                </telerik:InformationLayer.ShapeFill>
            </telerik:InformationLayer>
        </telerik:RadMap>
Wyatt
Top achievements
Rank 1
 answered on 08 Jul 2014
4 answers
449 views
I'm trying to set up my view model items with an IsExpanded property that I can use to expand & collapse their row programmatically. We previously did this with a TreeView pretty easily, but ended up needing the extra columns of a TreeListVIew so now we're trying to port over functionality to a TreeListView. Unfortunately I'm having problems getting rows to expand programmatically with a virtualized TreeListView.

I first tried using the IsExpandedBinding on the TreeListView itself:

IsExpandedBinding="{Binding IsExpanded, Mode=TwoWay}"

This successfully allowed my items to listen to when the user expanded/collapsed the item's row by clicking in the UI, but failed to ever propagate changes back to the UI when I modified my item's IsExpanded property programmatically.

My next attempt was to modify my TreeListView's TreeListViewRow's Style to binding the row's IsExpanded property directly to my item's IsExpanded property. This method almost works. The part where this fails is that my TreeListView uses virtualization, and any items not currently visible fail to update when their IsExpanded property gets modified via the binding.

So my questions are, does the IsExpandedBinding really support TwoWay? If so, what might we be doing wrong? If not, how can I get the row's IsExpanded binding to function when the TreeListView is virtualized?

Thanks!
Nick
Telerik team
 answered on 08 Jul 2014
1 answer
174 views
Hello!

I have a RadRichTextBox inside a DataTemplate, and I have HtmlDataProvider inside RadRichTextBox.Resources section bound to it. But for some reason this does not work, error message is:
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=RichTextBox'. BindingExpression:(no path); DataItem=null; target element is 'HtmlDataProvider' (Name=''); target property is 'RichTextBox' (type 'RadRichTextBox')


I can bind provider with radrichtextbox after both controls are initialized, but I want to do that in XAML.
Is there a way to accomplish this task?

(Also I could not attach sample project, because only image files are allowed)...
Petya
Telerik team
 answered on 08 Jul 2014
3 answers
184 views
Hi,

over the year more and more things have become "bindable" - a must have for MVVM.
What I still miss is Command Support.

Example - RadGridView.
I need special logic to store (insert / update) a row in the database.

What I have to do is handle the RowEditEnded (and if I need RowValidation) also the RowValidating events.

I solved this by subclassing the RadGridView and offering a "RowEditEndedCommand" and a "RowValidatingCommand" as ICommand.

Now I can handle the things without code behind.
Something like <xx:MyGridView RowEditEndedCommand="{Binding MySpecialCommand}"...

And what I got is a thing like a Button - I still can handle Events (OnClick) - but I can also bind a Command from my VM.

I don't know if I'm the only one with this need....

Manfred
Maya
Telerik team
 answered on 08 Jul 2014
3 answers
134 views
Hi!

I was searching how to do the redistribution of my application with telerik control in your website and I didn't found anything. In the future, when my application will be finished, I will have to give it with telerik control at my customers, but I do not know what I should do.

Please, can you explain me how to do?

Thanks, 
Yana
Telerik team
 answered on 08 Jul 2014
3 answers
121 views
My application puts up a login dialog before showing the main window.  If the login information is not correct, it calls .Close() on the main window to shut down the application.  Everything works except the RibbonView. 

If I call Close() during the main window Loaded event, the RibbonView throws a null handle exception.  I tried making the window start out invisible, and then showing it in the MainWindow ContentRendered event, but then the window (including the RibbonView) shuts down correctly, but with good login, the RibbonView does not show until the window is restored from maximized to be not full screen.

Be advised that the null handle exception does NOT happen when running in Visual Studio, only when running the built application.  Is this a known bug, and is there a workaround?  Thanks.
Milena
Telerik team
 answered on 08 Jul 2014
1 answer
134 views
I'm using VirtualizingWrapPanel  inside a Listbox, I have a list of objects as ItemsSource, the list exists all the time but when an object is in the view I retrieve it's image and show it, when an item is not in the view I remove the image, to reduce memory usage.
  
1. when I'm selecting object X and using shift + down arrow I see that the list is trying to retrieve all objects from 0 to X even when it is showing only 12 items at that time.
2. when using Ctrl +A (to select all objects) I don't want the list to retrieve all objects but only the ones that currently on the view.

Can you please advise what can I do to retrieve only the items that in the view?

Thanks,
Yael.
Ivan Ivanov
Telerik team
 answered on 07 Jul 2014
4 answers
274 views
I am trying to add custom ContextMenu to RadWatermarkTextBox using RadContextMenu.ContextMenu attached property and disabling the default context menu. The custom context menu is working fine with the following XAML

<telerik:RadWatermarkTextBox  Text="This is a test Text" Width="875" Height="70" ContextMenu="{x:Null}">
                    <telerik:RadContextMenu.ContextMenu>
                        <telerik:RadContextMenu >
                            <telerik:RadMenuItem Header="Copy" />
                            <telerik:RadMenuItem Header="Paste" />
                            <telerik:RadMenuItem Header="Cut" />
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadMenuItem Header="Select All" />
                        </telerik:RadContextMenu>
                    </telerik:RadContextMenu.ContextMenu>
                </telerik:RadWatermarkTextBox>

but the problem is, if I select some text and opens the context menu, the selection of RadWatermarkTextBox becomes clear as soon as context menu is open. Which doesn't look very good. And with default context menu this is not the behavior.

I have tried following code in ContextMenu Opening event but no luck

var tb = radContextMenu.GetClickedElement<RadWatermarkTextBox>();
if (tb != null)
{
   tb.Focus();
}

Please any suggestion for fix of this issue.
Muhammad Ummar
Top achievements
Rank 1
 answered on 07 Jul 2014
1 answer
518 views
Hi,

I have set up a working Geoserver on my LAN. My LAN is not connected to the Internet.
How can I use my GeoServer as the map provider for a RadMap control?

Sebastien
Andrey
Telerik team
 answered on 07 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?