Quantcast
Channel: Editors for WPF - Recent Posts
Viewing all 942 articles
Browse latest View live

Re: DoubleEditBox default DropDown DisplayMode

$
0
0

Hi Severin,

Here's the setter our default template uses:

<shared:CoalesceConverter x:Key="CoalesceConverter" />

...

<Setter Property="DropDownContentTemplate"><Setter.Value><DataTemplate><editors:Calculator DisplayMode="Minimal" BorderThickness="0"><editors:Calculator.Value><Binding Path="Value" Mode="TwoWay" RelativeSource="{RelativeSource AncestorType={x:Type editors:DoubleEditBox}}"
							Converter="{StaticResource CoalesceConverter}"><Binding.ConverterParameter><system:Double>0.0</system:Double></Binding.ConverterParameter></Binding></editors:Calculator.Value></editors:Calculator></DataTemplate></Setter.Value></Setter>

You should be able to use that and change the DisplayMode.


EnumEditBox throws null reference exception

$
0
0

1) Create a nullable enum property that is bound to the EnumEditBox

2) Start with a null property value

3) Use the EnumEditBox to change the value.

 

On the change commit, a NullReferenceException is thrown:

Message: Value cannot be null.
Parameter name: value
StackTrace: at System.RuntimeType.IsEnumDefined(Object value)
at ActiproSoftware.Windows.Controls.Editors.EnumListBox.#5P()
at ActiproSoftware.Windows.Controls.Editors.EnumListBox.OnSelectionChanged(SelectionChangedEventArgs e)
at System.Windows.Controls.Primitives.Selector.SelectionChanger.End()
at System.Windows.Controls.Primitives.Selector.SetSelectedHelper(Object item, FrameworkElement UI, Boolean selected)
at System.Windows.Controls.Primitives.Selector.NotifyIsSelectedChanged(FrameworkElement container, Boolean selected, RoutedEventArgs e)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.Controls.ListBoxItem.OnSelected(RoutedEventArgs e)
at System.Windows.Controls.ListBoxItem.OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetCurrentValueInternal(DependencyProperty dp, Object value)
at System.Windows.Controls.ListBox.NotifyListItemClicked(ListBoxItem item, MouseButton mouseButton)
at System.Windows.Controls.ListBoxItem.OnMouseLeftButtonDown(MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Re: EnumEditBox throws null reference exception

$
0
0

Hi Scott,

Sorry but I'm not seeing it happen.  Can you make a new simple sample project that shows this and mail it to our support address?  We'll debug using that.  Please reference this post and rename the .zip file extension so it doesn't get spam blocked.  Thanks!

view password hidden under star

$
0
0

Hi,

I am using PasswordBox to get a password from user. I would like to know, if there is an oppotunity to show to the user entered password for some period of time in PasswordBox, and then hide it again ? For example - I've entered passord in PasswordBox and see stars. Then i push button "show entered password" and inPasswordBox I see not stars, but entered password, and after, for example 5 seconds, in PasswordBox will be stars again.

Re: view password hidden under star

$
0
0

Hi Sasha,

Sorry but we don't have anything built-in for that at this time.  You would have to add some sort of custom button around the PasswordBox and then if pressed, render the password on top of the PasswordBox (probably with a solid background so it obscures the stars).

One thing that I would be concerned with is the security of doing this though.  PasswordBox is made so that the text being edited can't be scraped via a screen reader or other automation tool.  If a TextBlock was used to render the password to the user, that would be scrapable via one of those reader/automation tools.  I know Windows 8 now builds the sort of features you describe into native password boxes.  But they probably do it via something like a DrawingContext and not via TextBlock.

DateTimeEditBox support for Hebrew Calendar

$
0
0

Steps to reproduce (in Windows 7 Professional x64):
1. Set Regional Settings Language to Hebrew (Israel) and change Additional Settings's, Date tab, "Calendar type" to be "Hebrew Calendar". Take a note on the correct Calendar shown by Windows.
2. Notice the differences between the regional settings Calendar and Actipro's DateTimeEditBox Calendar.

Will DateTimeEditBox offer support for the Hebrew Calendar? Is this planned for a future realease?

Re: DateTimeEditBox support for Hebrew Calendar

$
0
0

Hello,

We don't have it on our TODO list at this time but if you would like to email our support address and reference this thread, we can discuss what would be needed to enable proper support.

Textbox selection loses highlight color when context menu shown

$
0
0

When you select text inside an actipro textbox the selected text becomes highlighted.

if you right click to bring up a context menu the selected text loses its highlight color

A standard wpf textbox does not behave this way.

Is there a way to make the actipro behave like the .net textbox?

  1. create a new wpf project
  2. add a actipro textbox
  3. add a contextmenu to the actipro textbox
  4. add a .net textbox
  5. add a contextmenu to the .net textbox
  6. launch the application.
  7. put some text in both text boxes
  8. select some text in the .net textbox
  9. right click on the .net textbox to bring up the context menu(notice the selection is still visible)
  10. select some text in the actipro textbox
  11. right click on the .net textbox to bring up the context menu(notice the selection is not visible)

<Window x:Class="WpfApplication4.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" xmlns:editors="http://schemas.actiprosoftware.com/winfx/xaml/editors">
<Grid>
<editors:TextBox HorizontalAlignment="Left" Margin="121,204,0,0" Name="textBox1" VerticalAlignment="Top" Width="273" >
<editors:TextBox.ContextMenu>
<ContextMenu>
<MenuItem Header="test"></MenuItem>
</ContextMenu>
</editors:TextBox.ContextMenu>

</editors:TextBox>
<TextBox Height="23" HorizontalAlignment="Left" Margin="109,269,0,0" Name="textBox2" VerticalAlignment="Top" Width="120" >
<TextBox.ContextMenu>
<ContextMenu>
<MenuItem Header="test"></MenuItem>
</ContextMenu>
</TextBox.ContextMenu>


Re: Textbox selection loses highlight color when context menu shown

$
0
0

Hi Stewart,

Thanks for letting us know about this.  We've updated it for the next maintenance release.

Re: Textbox selection loses highlight color when context menu shown

$
0
0

FYI The MaskedTextbox has the same problem.

 

Stewart

Color editor in property grid

$
0
0

I have a question about the color editor when it is embedded in a property grid.

When the color editor pop-out panel is exposed and I drag my mouse in the color gradient box, I get a stream of property changed events from the property grid.

Is there a way to limit this to only a single event when the drag is complete or will I need to build something around the color editor to solve this issue?

Re: Color editor in property grid

$
0
0

Hi Nathan,

Unfortunately the sliders there in the BrushEditor template are bound to the SelectedColor property and update it on PropertyChanged.  So you'd probably have to handle it some other way on your end.

BrushEditBox with just GradientControls

Re: BrushEditBox with just GradientControls

$
0
0

Hi Jacob,

What is described there is a valid solution.  Note that those are properties on BrushEditor (the control used in the popup), which is different from BrushEditBox.  So you'd need to make an implicit Style for BrushEditor that set those options.

Custom Editor displayed in right Moniotor

$
0
0

Hi,

I have created the custom editor for picking the color. When we use 2 screens and the App is running full screen in left monitor, the property grid is at right corner and I try to open this custom editor in property grid it opens in right monitor instead of left.

I tested this scenario with actipro editors and those work fine. similar to Actipro ColorEditor even my editor is derived from usercontrol and also the editBox is derived from TypeSpecificEditBoxBase as in BrushEditBox.

Is there some way I can restrict my custom editor to be displayed inside the main window bounds, so that the editor does not display in right moonitor in the above mentioned scenario.

I find no Owner property in TypeSpecificEditBoxBase class.

regards,

Rithesh


Use DoubleEditBox, type simple Mathematical Expression

$
0
0

I'm attempting to reproduce some legacy C++ MFC UI controls. One feature is the ability for the User to type in either a double value, or, a mathematical expression like "1 + 200mm - 9in".  Parsing the expression will be entirely up to my own code. And no, telling the user to use the Calculator drop down isn't going to cut it since the expression can have some pre-defined domain specific variables in it also.

The DoubleEditBox limits input, so using anything but digits, and decimals is prohibited.

Any thoughts on how I might get this functionality to work with any of the Editor Controls?

 

Thanks!

Re: Use DoubleEditBox, type simple Mathematical Expression

$
0
0

I've created a custom IValueConverter and put it on an Editor.TextBox and that works ok. I just lose a whole lot of stuff that DoubleEditBox gives me

Re: Custom Editor displayed in right Moniotor

$
0
0

Hi Rithesh,

It sounds like it's more of an issue with how WPF determines which monitor the popup will display on if there is overlap between the monitors.  I believe all our ColorEditBox does is set the DropDownContentTemplate.  You also can set the edit box's DropDownHorizontalAlignment property.  Let us know if that helps.

Re: Use DoubleEditBox, type simple Mathematical Expression

$
0
0

Hi Tom,

Unfortunately in this case, none of the editors as-is will work for you.  They are designed to only bind to a single value and don't have any support for expressions or any free-form entry.  That would require a custom control to accomplish (or what you did with TextBox) but we don't have anything in that area right now.  Sorry!

Re: Use DoubleEditBox, type simple Mathematical Expression

$
0
0

Hmm, I was afraid of that.

I've looked at the inheritance hierarchy of DoubleEditBox, and I was hoping to find a particular base class to start with. However, I'm not sure if that would be a good place to start on a custom control for this.

Do you think there is a good Actipro Editor base class I should use?  I don't know which class is doing the input filtering that DoubleEditBox has to only allow double value text input.

Viewing all 942 articles
Browse latest View live