custom-controls

Silverlight Error “Layout Cycle Detected Layout could not complete” when using custom control

牧云@^-^@ 提交于 2019-12-03 05:59:17
问题 I'm building a custom control in Silverlight by deriving from ContentControl and doing some special formatting to put a dropshadow behind the contents. I've nearly got it working but have recently ran into a bizarre error. It works fine if it contains anything besides a Border, or a Grid/Stackpanel/etc that does not have an explicitly defined height and width. I get a JavaScript error in IE, and the text says: Runtime Error 4008... Layout Cycle Detected... Layout Could Not Complete. If I

any Cocoa control code that I can use that acts as a patch bay?

依然范特西╮ 提交于 2019-12-03 04:49:41
I would like to make a patch bay type control... any source online that anyone knows of that I could work from? Thanks sbooth The closest thing I'm aware of is EFLaceView: http://www.cocoadev.com/index.pl?FlowChartView Edit: EFLaceView seems to have disappeared, but I have a saved copy: EFLaceView Edit: Version of EFLaceView on github , with more recent changes than link above. Unless you can find someone online who is sharing exactly the kind of control you're looking for, you don't have any choice but to build this for yourself. For that, you need to understand Control and Cell Programming ,

Create a custom Full sized Calendar Control [closed]

别等时光非礼了梦想. 提交于 2019-12-03 04:43:16
How can I make a custom control that show the calendar control in a much larger view. Like this or like the calendar view in outlook 2007. Do I have to make a custom class or can I just attempt to resize the calendar. I am doing this in WPF so I use WPF Toolkit You probably need a custom class -- the control in WPF is designed to be a picker, not a displayer of data on a timeline. That stated, you could try extending, and retemplating the calandar control to allow display of data in the form you want. if you are just looking for a huge, lickable date picker, then you could just use a scale

How can I manually tell an owner-drawn WPF Control to refresh/redraw without executing measure or arrange passes?

僤鯓⒐⒋嵵緔 提交于 2019-12-03 04:42:50
问题 We are doing custom drawing in a control subclass's OnRender . This drawing code is based on an external trigger and data. As such, whenever the trigger fires, we need to re-render the control based on that data. What we're trying to do is find out how to force the control to re-render but without going through an entire layout pass. As stated above, most answers I've seen revolve around invalidating the Visual which invalidates the layout which forces new measure and arrange passes which is

Custom elements in ASP.NET with custom child-elements

狂风中的少年 提交于 2019-12-03 04:27:10
问题 I know that it is possible to define custom tags in ASP.NET with User Controls. But as far as I know you can only add attributes to these controls. I would like to be able to embed more complex data, a bit lite this: <myControls:MyGraph id="myGraph1" runat="server"> <colors> <color>#abcdef</color> <color>#123456</color> </colors> </myControls:MyGraph> It this possible in ASP.NET? Should I try to extend a ListView? Or it there a better and more correct solution? 回答1: It is certainly possible.

How to play 360 video on the iOS device

本秂侑毒 提交于 2019-12-03 04:25:51
问题 Looking through different web sites and analyzing different resources I found out that for playing 360 videos on the iPhone you should use 3-d party lib ( Panorama ). But I'm really interested in how it is possible to do it by your own. Because standard iOS elements does not support such functionality. Please give some advices about approaches that should i use to create own player for 360 videos. 回答1: You can do it using scenekit, without any external libraries or dependencies. Create a

UITextView's inputView on iOS 7

耗尽温柔 提交于 2019-12-03 04:23:41
I'm trying to create a custom keyboard for a UITextField, the background of this inputView should be transparent, I have set the background color in the view's xib file to "clear color". It is working great on iOS 6 and earlier.. but on iOS 7 it not working Any idea how can I make it work? I want it to be fully transparent This will set the backdrops opacity to zero when displaying your custom keyboard and reset it back to 1 when the normal keyboard is shown. + (void)updateKeyboardBackground { UIView *peripheralHostView = [[[[[UIApplication sharedApplication] windows] lastObject] subviews]

iPhone / iOS custom control

吃可爱长大的小学妹 提交于 2019-12-03 03:58:22
问题 I would like to know how to create a custom iPhone control from scratch, or using an existing library or framework. I have seen the three20 library, aswell as tapku and touch customs which are nice for specialised iOS controls such as table view etc but I'm talking about making totally custom, interactive controls here. Lets say I wanted to make a dial control similar to the one from this app: http://store.apple.com/us/product/H2654LL/A. Where would I start? Would I subclass UIView and

WPF: A TextBox that has an event that fires when the Enter Key is pressed

扶醉桌前 提交于 2019-12-03 03:15:34
问题 Instead of attaching a PreviewKeyUp event with each TextBox in my app and checking if the pressed key was an Enter key and then do an action, I decided to implement extended version of a TextBox that includes a DefaultAction event that fires when an Enter Key is pressed in a TextBox . What I did was basically create a new Class that extends from TextBox with a public event DefaultAction , like such: public class DefaultTextBoxControl:TextBox { public event EventHandler<EventArgs>

Custom Control in ASP.NET C#

扶醉桌前 提交于 2019-12-03 01:11:44
I created a simple custom control that only inherits from the Literal control, and doesn't have any extensions yet, code is empty. Namespace: CustomControls Class name: Literal : System.Web.UI.WebControls.Literal Next thing I do is registering this control in the aspx page as following: <%@ Register TagPrefix="web" Namespace="CustomControls" %> (I read in few tutorials that this is one of the ways to register it, besides web.config etc.) After all, no intellisence for me, and worse- I get a parse error 'unknown server tag: web' when I try to run the page with the control in it. I used 'create