custom-controls

SeekBar with custom thumb and segmented text

牧云@^-^@ 提交于 2019-12-23 12:43:10
问题 Hello All, I am looking for a seekbar like this image. I succeeded in setting background but problem is thumb and segments text below seek bar. Does anyone know solution Thank You 回答1: Using this library here is a minimum example code that worked for me: <com.infteh.comboseekbar.ComboSeekBar xmlns:custom="http://schemas.android.com/apk/res-auto" android:id="@+id/seekbar" android:layout_width="fill_parent" android:layout_height="wrap_content" custom:color="#000" custom:textSize="12sp" custom

Swift reusable UITextFieldDelegate

◇◆丶佛笑我妖孽 提交于 2019-12-23 12:35:04
问题 I am trying to implement a reusable UITextFieldDelegate class as follows: class CustomTextFieldDelegate : NSObject, UITextFieldDelegate All delegate protocol methods are implemented correctly. In the controller , I assign the delegate to the UITextField textField.delegate = CustomTextFieldDelegate() The problem is that none of the delegate functions get called. However, when I implement the delegate protocol from the controller, then things work fine class CustomTableViewController:

Dynamic Style Binding with IValueConverter

我的梦境 提交于 2019-12-23 11:52:53
问题 I am trying to set a style, which is defined in the App.xaml , dynamically when loading a user control and it's just not applying the style for some reason (i.e. there is no error occurring, it's just not applying the style). I'm sure it's because I've defined the binding wrong, but I'm unable to figure out what I need to do differently to get it to work. App.xaml Style The style I'm after is the RunningTitleBlock and it's comprised of a couple other styles that I've included in the below

Dynamic Style Binding with IValueConverter

浪子不回头ぞ 提交于 2019-12-23 11:52:05
问题 I am trying to set a style, which is defined in the App.xaml , dynamically when loading a user control and it's just not applying the style for some reason (i.e. there is no error occurring, it's just not applying the style). I'm sure it's because I've defined the binding wrong, but I'm unable to figure out what I need to do differently to get it to work. App.xaml Style The style I'm after is the RunningTitleBlock and it's comprised of a couple other styles that I've included in the below

How to create custom control of existing user control

帅比萌擦擦* 提交于 2019-12-23 06:56:55
问题 I have created one user control for multiple file upload , i need to create its custom control so that I can have a dll of that control. What are the ways that I can do this? usercontrol.ascx <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <script src="Scripts/jquery.MultiFile.pack.js" type="text/javascript"></script> <div><%-- accept attribute can be used like accept="png|jpg"--%> Multiple File Upload<br /> <asp:FileUpload ID="FileUpload10" runat="server" class=

How to Bind a specific ObservableCollection item's property to a CustomControl's ControlTemplate

穿精又带淫゛_ 提交于 2019-12-23 05:12:33
问题 I have a custom control with an observable-collection of "states", sort of like a multiple-state-button. Only the necessary code is here to avoid confusion: public class MyMultiStateBtn : ItemsControl { MyMultiStateBtn() { m_states = new ObservableCollection<MyState>(); } private ObservableCollection<MyState> m_states; public System.Collections.ObjectModel.ObservableCollection<MyState> States { get { return m_states; } set { m_states = value; } } } The "MyState" class (the objets in the

Issues with custom DataPager

徘徊边缘 提交于 2019-12-23 04:28:50
问题 I am trying to extend the asp.net DataPager control into a custom control with predefined templates. This is the desired output Problems : When I load the page containing the custom DataPager for the first time, the SelectMethod of my ObjectDataSource is called 3 times. When I try to load another page of data using the DataPager, the SelectMethod is called twice. When I try to load another page of data, either by using the Next/Previous buttons or the DropDownList, the page does not change. I

Wrapped WPF Control

吃可爱长大的小学妹 提交于 2019-12-23 03:12:36
问题 I'm trying to create a GUI (WPF) Library where each (custom) control basically wraps an internal (third party) control. Then, I'm manually exposing each property (not all of them, but almost). In XAML the resulting control is pretty straightforward: <my:CustomButton Content="ClickMe" /> And the code behind is quite simple as well: public class CustomButton : Control { private MyThirdPartyButton _button = null; static CustomButton() { DefaultStyleKeyProperty.OverrideMetadata(typeof

How to customize an android spinner similar to gmail app?

♀尐吖头ヾ 提交于 2019-12-23 02:58:19
问题 I'm kind of new to android, so sorry in advance if this is a silly question. I wanted to get some guesses on how gmail (or other apps) accomplish their custom spinner title, as shown in the picture: I am mainly interested in the "Recent" text. How do they achieve this kind of customization? Thanks in advance. 回答1: you just need to implement popup window http://developer.android.com/reference/android/widget/PopupWindow.html example with source code http://www.androidhub4you.com/2012/07/how-to

UIView with custom shape

不羁岁月 提交于 2019-12-23 02:06:07
问题 I want to have a UIElement (any of UIView, UIButton, UILabel etc.) with custom shape lets say a triangle. How do you suggest to achieve it. Thanks in advance. 回答1: Here is a sample of a UIView subclass (triangle): @implementation TriangleView - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code } return self; } - (void)drawRect:(CGRect)rect { // Drawing code CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextBeginPath(ctx);