How to reference a custom class library in wp7 - windows-phone-7

I have created a windows phone class library, I need to add this library as a reference to my application. How do I do this?

Same as a normal project/class library - right click on the project in solution explorer, select add reference. If the project is also in the current solution, choose it from the projects tab.

Related

Why can't I add a class file as a Forms in my Xamarin project?

I created a new class project in shared-code platform to use a module for Prism. I am trying to add a new xaml file with a code behind but it's not letting me add it as an option. How can I add the missing Forms tab on the side menu on my project?
When creating a standard library, it usually doesn't come with Xamarin Forms, make sure you have Xamarin Forms added in your dependencies.

Hide Menu items from Netbeans Platform Application in Maven

This is related to How do I hide menus without a layer file in NetBeans Platform? and How to remove items from menu in netBeans platform?. Sadly those are related to an ant built platform.
I'm trying to find out how to the same in Maven built application. I bet there's a way to add a custom layer file.
Any ideas?
It actually works the same way even if you have a Maven-based NetBeans platform application. Try right clicking the module of interest and selecting New->Other->Module Development->XML Layer. This will create and register the layer.xml for you, which you can then hack as desired.

How do I go about adding a website to Silverlight

Say I had (foolishly) setup a Silverlight project in VS and failed to setup a supporting website at time of instantiation are there any steps I can take to add one retrospectively?
Many thanks.
Do the following:-
Add a new Web Application or Web Site to the existing solution.
Open the properties of the new Web Application, on the Silverlight tab select Add..., select the existing SL project in the project drop-down (already selected by default), Click Add.
Set the web app to be the startup project
Select the newly created test .aspx page that will have been created for you as the start page.
Now you are where you would have been had you opted to create the test web app when creating the solution.
The simplest solution might be to create a new solution with the supporting website project and copy your Silverlight project into that and carry on working in the new solution.
You could also copy the web project to your existing solution. In that case you'll need to change the name of the referenced .xap file.

How does MacOS developer navigate large code base

I am new to MacOS development. I would like to know how developer navigate code in a large code base on MacOS? E.g. webkit? I have webkit (c++) built in XCode, but the source code navigate is not that great.
I am looking for something like Java source code navigation in eclipse. e.g. display class hierarchy, e.g. caller of a particular method?
Any one has any idea?
I think what you are looking for is the "Project Symbols" item in the Groups & Files sidebar.
If you double-click it, there are more view/filters, like only showing your project's classes:
Project Symbols http://img25.imageshack.us/img25/6709/symbolbrowserwebkit.png
TextMate (commercial program) has a project browser, it's better than just using XCode to get an overview. For navigating the many files to see how the big projects are layed out, you need a good file manager, such as PathFinder.
Class Browser may help.
Project->Class Browser or Command+Shift+C

.NET VS2005 WinForms: How do i drop a user control onto a form?

i've written a UserControl descendant that is in an assembly dll.
How do i drop the control on a form?
namespace StackOverflowExample
{
public partial class MonthViewCalendar : UserControl
{
...
}
}
i've added a reference to the assembly under the References node in the Solution Explorer, but no new control has appeared in my Toolbox.
How do i make the control appear in the Toolbox so i can drop it on a form?
Update 1:
i tried building the assembly while the Visual Studio option:
Tools-->Options...-->Windows Forms Designer-->AutoToolboxPopulate = true
The control didn't appear when in the toolbox in a new solution.
Note: i somehow mistakenly wrote "...that is not in an assembly dll...". i don't know how i managed to write that, when it specifically is in an assembly dll. Controls have magically appeared when they're in the same project, but not now that it's a different project/solution.
Update 2: Answer
Right-click the Toolbox
Select Choose Items...
.NET Framework Components tab
Select Browse...
Browse to the assembly dll file that contains the control and select Open
Note: Controls in the assembly will silently be added to the list of .NET Framework Components.
Check each of the controls you wish to appear in the toolbox
Select OK
Normally, when you build your project, your user control will appear in your toolbox at the top. Normally, you will see a new pane with each of your Assemblies and the controls in there.
If that doesn't happen, you can also add your control by right clicking on the toolbox, selecting Choose Items, then under .NET Framework Components browsing for your assembly, adding it, then make sure your control is checked.
What I notice is that User Controls and Components are only automatically added to the Toolbox by vs2005 when your project (containing the controls/components) is located in the same folder as your solution. When this project is in a subfolder vs2005 won't add the controls and components in the Toolbox.
I stumbled upon some problems with this. In the end, just rebuild and re-reference will work. I had preferred to inherit from UserControl. It made my life simpler ;)
If for example you want to create a "rounded border" label, do something like this:
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace YourUIControls
{
[DefaultProperty("TextString")]
[DefaultEvent("TextClick")]
public partial class RoundedLabel : UserControl
{
public RoundedLabel()
{
InitializeComponent();
}
protected override void OnPaint(PaintEventArgs e)
{
//Draw your label hereā€¦
}
}
}
Compile and add a reference to the output. You'll be able to drag that to the Toolbox and later to the Designer.
You need to build the project containing the control you've created and make sure your options are set for the Toolbox to rebuild. If you haven't changed it from defaults, it should work; otherwise, go to Tools-->Options... and select the Windows Forms Designer group. Make sure the AutoToolboxPopulate option is set to true.
You don't need the ToolboxItemAttribute for it to work. If the providing assembly is in the same solution as the consuming assembly, it should appear in the toolbox. If the providing assembly is not part of the solution, you can manually add the assembly to the toolbox by selecting **Choose items...* from the toolbox context menu and adding your assembly directly. If you want the toolbox to automatically pick them up, you will need to use the ToolboxItemAttribute.
Add the ToolboxAttribute to your class.

Resources