custom-controls

WPF detect scrolling parent Control

荒凉一梦 提交于 2019-12-03 12:39:28
Imagine the situation you open a WPF Popup (e.g. through ButtonClick ). You have a ListBox directly in the Popup with some items, so you have to be able to scroll. Imagine that this is your Custom Control and it's located in the ScrollViewer . Now if you move with your mouse outside from the Popup surface and scroll, what happens? You scroll up and down but with the Popup opened ! And that's the problem. The question is, how to detect from inside the Control, that some other unknown Parent Control in the VisualTree has started to scroll ? and consecutively set IsDropDownOpen = false ? We can

Multiple ListRows for each Header on BrowseFragment - Leanback library

元气小坏坏 提交于 2019-12-03 12:31:41
I'm getting started with Leanback support for our app. As per UI requirements I need to add multiple list rows corresponding to each header, it's exactly like what Youtube App does on Android TV. Default ListRowPresenter seems to be rendering only one list row and its header. Is there any presenter that supports multiple list rows? I'm thinking on the lines creating a custom presenter with RowsFragment embedded in each item, correct me if my approach is wrong. The Leanback team has recently added in support for multiple ListRow s for one HeaderItem in version 24.0.0 of the library. It allows

Custom control OnApplyTemplate called after dependency property callback

99封情书 提交于 2019-12-03 12:25:09
I'm developing my first WPF custom control and I'm facing some problems, here's a simplified version of the code I'm currently using: using System.Windows; using System.Windows.Controls; namespace MyControls { [TemplatePart(Name = "PART_Button", Type = typeof (Button))] public class MyControl : Control { public static readonly DependencyProperty ContentProperty = DependencyProperty.Register("Content", typeof (object), typeof (MyControl), new PropertyMetadata(null, OnLabelPropertyChanged)); private Button _buttonElement; public object Content { get { return this.GetValue(LabelProperty); } set {

There are no components in DLL that can be placed on toolbox

笑着哭i 提交于 2019-12-03 11:51:29
I have a DatePicker custom control that I am trying to add to toolbox. The name of the file is BasicFrame.WebControls.BasicDatePicker.dll and I go through the procedure of right click in Toolbox > Choose Items and then selecting the file after browsing to it under .NET Framework components. I however get this error message: There are no components in that can be placed on toolbox Why do I get this message and how can I resolve it? MikeT Have you checked the visibility of the custom classes? If you haven't declared them as public they will default to internal and hence aren't exposed to Visual

AutoCompleteTextView with custom list: how to set up OnItemClickListener

柔情痞子 提交于 2019-12-03 10:16:46
问题 I am working on an app which uses tags. Accessing those should be as simple as possible. Working with an AutoCompleteTextView seems appropriate to me. What I want: existing tags should be displayed in a selectable list with a CheckBox on each item's side existing tags should be displayed UPON FOCUS of AutoCompleteTextView (i.e. not after typing a letter) What I've done so far is storing tags in a dedicated sqlite3 table. Tags are queried resulting in a Cursor. The Cursor is passed to a

ExtJs 4 combobox with checkboxes

江枫思渺然 提交于 2019-12-03 09:47:26
问题 I'm looking for EXTJS4 combobox control which allows selecting multiple items via checkboxes inside. Actually I need this control http://lovcombo.extjs.eu/ but it is implemented for ExtJs3. I tried to convert it to ExtJs4 but the task is not trivial actually. Could you suggest similar component for ExtJs4. Or maybe you could point me to some tutorial or example - how to do such things? 回答1: Multiselect combo with checkbox in ExtJS4.0 can be achieved with addition few lines of code. Basically

Styling a BlackBerry Application to Look Like an iPhone

北战南征 提交于 2019-12-03 08:54:55
I am porting an application from iPhone to BlackBerry. BlackBerry apps tend not to look as polished as iPhone, but naturally, I would like to maintain as much polish as I can, without breaking any important UI conventions. Are there any UI components that can help with this? NB. I am planning to follow all important UI conventions. For example, I will use the BlackBerry Menu instead of a tab bar for providing access to help and some other advanced options. Links Make BlackBerry UI Components Look Like iPhone Components Maksym Gontar You can extend blackberry controls with custom drawing , or

Volume Slider like VLC

回眸只為那壹抹淺笑 提交于 2019-12-03 08:54:07
I am searching for Volume Slider that looks and behave just like VLC's slider. I found the following post about how to style the slider: Volume Slider CustomControl but I also want the same behavior... What is the difference between the behaviors: When you click on the slider [at the WPF] and move the mouse on the slider area (while mouse button still being hold) it should move the slider also to the position of the mouse on the slider. I couldn't find how to do it.. maybe I should use something different than Slider? Thanks for the help! There is a property on the slider called

Custom Control for DataGridTemplateColumn

自古美人都是妖i 提交于 2019-12-03 08:38:29
I'm currently attempting to create a custom control out of a DataGridTemplateColumn that will be reused across many of our applications. I'm running into some issues getting a dependency property on the custom control to bind and raise the property changed notification correctly. I currently have the control inheriting from DataGridTemplateColumn the xaml looks like this: <DataGridTemplateColumn x:Class="Controls.DataGridDateColumn" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <DataGridTemplateColumn.CellTemplate>

using C# and UI Automation to grab contents of unknown control-type

泪湿孤枕 提交于 2019-12-03 08:33:22
In the image below there is an area, which has an unknown (custom) class. That's not a Grid or a Table. I need to be able: to select Rows in this area to grab a Value from each cell The problem is since that's not a common type element - I have no idea how to google this problem or solve it myself. So far the code is following: Process[] proc = Process.GetProcessesByName("programname"); AutomationElement window = AutomationElement.FromHandle(proc [0].MainWindowHandle); PropertyCondition xEllist2 = new PropertyCondition(AutomationElement.ClassNameProperty, "CustomListClass",